Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] PSQL commands: \quit_if, \quit_unless |
Дата | |
Msg-id | 12343.1484371346@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] PSQL commands: \quit_if, \quit_unless (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
Re: [HACKERS] PSQL commands: \quit_if, \quit_unless Re: [HACKERS] PSQL commands: \quit_if, \quit_unless |
Список | pgsql-hackers |
Pavel Stehule <pavel.stehule@gmail.com> writes: > 2017-01-14 0:20 GMT+01:00 Corey Huinker <corey.huinker@gmail.com>: >> - leaving loops out for now? > +1 I'm just going to say one thing about that: some people will remember that you can build a Turing machine with either conditionals+iteration or conditionals+recursion. I wonder what depth of include-file nesting psql can support, or whether we'll be able to fix it to optimize tail recursion of an include file. Because somebody will be asking for that if this is the toolset you give them. regards, tom lane PS: if I'm being too obscure for you, consider: $ cat loop.sql \if :x < 1000 \echo :x \set x :x + 1 \include loop.sql \fi $ psql --set x=0 -f loop.sql 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.
В списке pgsql-hackers по дате отправления: