| От | Fabien COELHO |
|---|---|
| Тема | Re: [HACKERS] PSQL commands: \quit_if, \quit_unless |
| Дата | |
| Msg-id | alpine.DEB.2.20.1701140734040.15294@lancre обсуждение исходный текст |
| Ответ на | Re: [HACKERS] PSQL commands: \quit_if, \quit_unless (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
> $ cat loop.sql > \if :x < 1000 > \echo :x > \set x :x + 1 > \include loop.sql > \fi > $ psql --set x=0 -f loop.sql Nice one! CPP does not have arithmetic, so it is harder to do that because one must reimplement arithmetic with #if... > Somebody is going to think of that workaround for not having loops, and > then whine about how psql runs out of file descriptors and/or stack. One can already have "include nested too deeply" errors, I guess, without a recursion. I would say that's this consequence is acceptable, and that this is a feature. I think having some kind of client-side test brings significant value because it would help writing application schema upgrades for instance, and that the this potential whining source is worth handling. -- Fabien.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера