Re: \ef should probably append semicolons - Mailing list pgsql-hackers

From Tom Lane
Subject Re: \ef should probably append semicolons
Date
Msg-id 9650.1223687450@sss.pgh.pa.us
Whole thread Raw
In response to \ef should probably append semicolons  ("Joshua Tolley" <eggyknap@gmail.com>)
Responses Re: \ef should probably append semicolons
Re: \ef should probably append semicolons
List pgsql-hackers
"Joshua Tolley" <eggyknap@gmail.com> 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.

Now, if you want to fix psql so that even with a semicolon there it
will redisplay the command buffer and wait for a return, then I'd agree
that that's an improvement.  I couldn't figure out how to get readline
to cooperate with that ... but I didn't spend a lot of time looking.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Nikolas Everett"
Date:
Subject: Re: How is random_page_cost=4 ok?
Next
From: "Robert Haas"
Date:
Subject: Re: The Axe list