From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jan Urbański <wulczer(at)wulczer(dot)org>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: review: psql: edit function, show function commands patch |
Date: | 2010-08-14 14:09:04 |
Message-ID: | 8503.1281794944@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> attached updated \sf implementation. It is little bit simplyfied with
> support a pager and output forwarding. Formating was updated per Tom's
> request.
Applied with corrections --- mostly, fixing it to not trash the query
buffer, which would certainly not be expected behavior for such a
command.
Also, as previously mentioned, I took out the line number argument,
which seemed to me to have little if any use-case while substantially
complicating the code. (It's not so much that it cost a lot in the
patch as submitted, it's that it *would* cost a lot if you were
honoring it in the pager calculation...)
One other thing: I took a look at the pg_get_functiondef() code and
realized that in fact it does NOT guarantee that the function body
will start with "AS $function...". In languages with a nonnull
probin field, that's not what the line will look like. I think though
that looking for just "AS " at the start of the line is sufficient
for our purposes here. I will go change the \ef and \sf code for
that.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-08-14 15:49:46 | Re: BUG #5608: array_agg() consumes too much memory |
Previous Message | Bruce Momjian | 2010-08-14 13:47:57 | Re: Re: [COMMITTERS] pgsql: Recognize functional dependency on primary keys. |