On Fri, Oct 10, 2008 at 09:10:50PM -0400, Tom Lane wrote: > "Joshua Tolley" <[EMAIL PROTECTED]> writes: > > The new \ef psql command creates nicely usable "CREATE OR REPLACE > > FUNCTION ..." text based on the function I tell it to edit, but the > > text it creates *doesn't* include a final semicolon, so when I exit my > > editor-of-choice after messing with my function, it doesn't run the > > code I've given it until I type one of my own. This is annoying. > > This is intentional. > > If the semicolon is there, the command will be squirted to the backend > instantaneously upon your exiting the $EDITOR. The potential bad > consequences of that seem to me to outweigh the annoyance factor of > typing ; and return.
To mitigate this annoyance, we could have \ef prepend a multi-line-style comment (proof against editor wrapping) that reads something like: /* To make these changes take effect immediately, put a semicolon after the $FUNCTION$ tag */ Speaking of the $FUNCTION$ tag, it appears to be being put in there unconditionally, which will eventually break somebody's code. How does pg_dump handle the dollar quoting situation, and could this machinery be used here? Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers