Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)
От | Corey Huinker |
---|---|
Тема | Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless) |
Дата | |
Msg-id | CADkLM=fbsnkWUWOKz8JiU5hN-8mKDm7MgsuAq6pHk-22eqJ3xA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless) (Erik Rijkers <er@xs4all.nl>) |
Ответы |
Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)
|
Список | pgsql-hackers |
On Thu, Feb 9, 2017 at 4:43 PM, Erik Rijkers <er@xs4all.nl> wrote:
On 2017-02-09 22:15, Tom Lane wrote:Corey Huinker <corey.huinker@gmail.com> writes:
The feature now ( at patch v10) lets you break off with Ctrl-C anywhere. I like it now much more.
The main thing I still dislike somewhat about the patch is the verbose output. To be honest I would prefer to just remove /all/ the interactive output.
I would vote to just make it remain silent if there is no error. (and if there is an error, issue a message and exit)
thanks,
Erik Rijkers
Changes in this patch:
- invalid boolean expression on \if or \elif is treated as if the script had a bad \command, so it either stops the script (ON_ERROR_STOP, script mode), or just gives the ParseVariableBool error and continues.
- All interactive "barks" removed except for
"command ignored. use \endif or Ctrl-C to exit current branch" when the user types a non-branching \command in a false branch
"query ignored. use \endif or Ctrl-C to exit current branch" when the user types a non-branching \command in a false branch
"\if: escaped" when a user does press Ctrl-C and they escape a branch.
- remaining error messages are tersed:
\elif: cannot occur after \else
\elif: cannot occur after \else
\elif: no matching \if
\else: cannot occur after \else
\else: cannot occur after \else
\else: no matching \if
\endif: no matching \if
found EOF before closing \endif(s)
found EOF before closing \endif(s)
Вложения
В списке pgsql-hackers по дате отправления: