Re: [PATCH] "\ef <function>" in psql

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Abhijit Menon-Sen <ams(at)oryx(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, gavin(at)alcove(dot)com(dot)au
Subject: Re: [PATCH] "\ef <function>" in psql
Date: 2008-09-07 00:19:38
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Abhijit Menon-Sen wrote:
> > At 2008-09-06 14:58:25 -0400, tgl(at)sss(dot)pgh(dot)pa(dot)us wrote:
> > > What about the general issue that neither \e nor \ef leave you with a
> > > presentation of what's in the query buffer?
> >
> > I don't know how that can be fixed; but I agree with Brendan that it's
> > behaviour that people are used to, and that it can be left alone for
> > now.
> As far as it works to not execute the query when the user exits without
> saving the buffer, it should be OK.

Well, it works like \e now, which is good. The only complexity is that
\e works differently depending on whether you use ';' or \g, meaning:


will execute the buffer on exit (saved or not), while


will not execute the buffer on editor exit. Our current \ef code does
not add a trailing semicolon to the CREATE FUNCTION buffer contents so
it works like the second case, which is probably the best we are going
to do.

Bruce Momjian <bruce(at)momjian(dot)us>

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-09-07 00:55:48 Re: Review Report: propose to include 3 new functions into intarray and intagg
Previous Message Tom Lane 2008-09-06 23:59:55 Re: [PATCH] allow has_table_privilege(..., 'usage') on sequences