Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
Дата
Msg-id CADkLM=edWn9Kfj10BUAr4VTkLxAmkAc_u0_6AfjHTBC6phmhRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
Typo "unterminted".

Fixed. 
 
The \if within the \if false branch is not tallied properly? Am I missing something?

Nope, you found a bug. FIxed. Test-case added.
 
I changed the paragraph to

       Lines within false branches are parsed normally, however, any completed
       queries are not sent to the server, and any completed commands other
       than conditionals (<command>\if</command>, <command>\elif</command>,
       <command>\else</command>, <command>\endif</command>) are ignored.

I'm not sure about the ", however, " commas, but I'm sure that I do not know English punctuation rules:-)

Re-worded it again for shorter sentences. Re-mentioned that conditionals are still checked for proper nesting.

* Changed comments to reflect that \if always evalutes <expr> even in a false branch
* Changed \elif to first check if the command is in a proper \if block before evaluating the expression. The invalid boolean message would mask the bigger problem.
Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Enabling parallelism for queries coming from SQL orother PL functions
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] WIP: Covering + unique indexes.