On Sat, Sep 6, 2008 at 10:10 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > > * the way you had it set up, the CREATE OR REPLACE FUNCTION command > would be sent to the backend instantaneously upon return from the > editor, with no opportunity for the user to decide he didn't want his > changes applied. This seemed unacceptably dangerous to me. I changed > the exit code to PSQL_CMD_NEWEDIT instead of PSQL_CMD_SEND, which causes > the command to wait in the query buffer.
The principle of least astonishment suggests that \ef should behave in the same way as \e. With \e (which I use a lot), the command(s) are immediately executed by the backend as soon as you write and exit from the editor. I don't find that dangerous, and anyone who uses \e will already be very much accustomed to it. If \ef did something different, it would just be weird. If you're not sure you want to execute the contents of your \e editor session after all, you can always delete the semicolon, or everything in the file, before quitting. Cheers, BJ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers