Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Daniel Verite <daniel@manitou-mail.org>
From: "Daniel Verite" <daniel@manitou-mail.org>
To: "Corey Huinker" <corey.huinker@gmail.com>
Cc: "Fabien COELHO" <coelho@cri.ensmp.fr>,"Erik Rijkers" <er@xs4all.nl>,"Tom
Lane" <tgl@sss.pgh.pa.us>,"Jim Nasby"
<Jim.Nasby@bluetreble.com>,"PostgreSQL"
<pgsql-hackers@postgresql.org>,pgsql-hackers-owner@postgresql.org
Date: 2017-02-03T17:20:37Z
Lists: pgsql-hackers
Corey Huinker wrote: > I meant in the specific psql-context, does it do anything other > than (attempt to) terminate sent-but-not-received SQL queries? It cancels the current edit in the query buffer, including the case when it spans multiple lines. If we add the functionality that Ctrl+C also exits from branches, we could do it like the shell does Ctrl+D for logout, that is it logs out only if the input buffer is empty, otherwise it does the other functionality bound to this key (normally Delete). So if you're in the middle of an edit, the first Ctrl+C will cancel the edit and a second one will go back from the /if Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
Commits
-
Support \if ... \elif ... \else ... \endif in psql scripting.
- e984ef5861df 10.0 landed
-
Add a "void *" passthrough pointer for psqlscan.l's callback functions.
- 895e36bb3f36 10.0 landed