Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
В списке pgsql-hackers по дате отправления:
| От | Fabien COELHO |
|---|---|
| Тема | Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless) |
| Дата | |
| Msg-id | alpine.DEB.2.20.1703030709210.12372@lancre обсуждение исходный текст |
| Ответ на | Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless) (Corey Huinker <corey.huinker@gmail.com>) |
| Ответы |
Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
|
| Список | pgsql-hackers |
Hello Corey,
> v20: attempt at implementing the switch-on-all-states style.
For the elif I think it is both simpler and better like that. Whether
committer will agree is an unkown, as always.
For endif, I really exagerated, "switch { defaut: " is too much, please
accept my apology. Maybe just do the pop & error reporting?
For if, the evaluation & error could be moved before the switch, which may
contain only the new state setting decision, and the push after the
switch? Also, I would suggest to use default only to detect an unexpected
state error, and list all other states explicitely.
--
Fabien.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера