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=fxL+fg1S_oCn3DXyAZy0cBOM77sGRAScHsop_M2=WHJw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)  (Jim Nasby <Jim.Nasby@BlueTreble.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)  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers

On Wed, Feb 1, 2017 at 4:58 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
I think the issue here is that the original case for this is a user accidentally getting into an \if and then having no clue what's going on. That's similar to what happens when you miss a quote or a semicolon. We handle those cases with %R, and I think %R needs to support if as well.

Perhaps there's value to providing more info (active branch, etc), but ISTM trying to do that will just confuse the original (%R) case.

Jim,

After spending a few minutes to familiarize myself with %R, I'm in agreement with your second statement (adding if-else to %R will just confuse %R). However, your first statement seems to indicate the opposite. Can you elaborate?

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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Erik Rijkers
Дата:
Сообщение: Re: [HACKERS] TRAP: FailedAssertion("!(hassrf)", File:"nodeProjectSet.c", Line: 180)
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: \if, \elseif, \else, \endif (was Re: [HACKERS] PSQL commands:\quit_if, \quit_unless)