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=eA+rxg+vA1q0hGqfxH0WeWsLU+7W3xtvxfMO1Rw2YLSw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless) (Corey Huinker <corey.huinker@gmail.com>) |
Ответы |
Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands: \quit_if, \quit_unless)
|
Список | pgsql-hackers |
All,
As it is, I've added interactive mode psql_error notifications about the resulting branching state of any branching commands, and any attempt to send non-branching commands or queries while in an inactive branch will generate a psql_error saying that the command was ignored. Waiting til I get what should or shouldn't be done about prompts before issuing the next patch revision.
So far, interactive branching information will look like this (it prints on every branching command and on every ignored command):
# \if trueactive \if, executing commands# select 1;?column?----------1(1 row)Time: 0.282 ms# \elseinactive \else, ignoring commands# select 1;inside inactive branch, query ignored.# select... # 1;inside inactive branch, query ignored.# \endifactive \endif, executing commands# \if falseinactive \if, ignoring commands# \i file_nameinside inactive branch, command ignored.# \elif falseinactive \elif, ignoring commands# \elseactive \else, executing commands# \endifactive \endif, executing commands
Comments welcome.
В списке pgsql-hackers по дате отправления: