Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
Дата
Msg-id CA+TgmoYju6qhvKf4rZ8mxp5p63uFCwMturHorj8razmMxf8rcg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] PSQL commands: \quit_if, \quit_unless  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] PSQL commands: \quit_if, \quit_unless  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Sat, Jan 14, 2017 at 12:22 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> $ 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.

Hmm, I think somebody just DID think of it.

But personally this doesn't upset me a bit.  If somebody complains
about that particular thing, I think that would be an excellent time
to suggest that they write a patch to add a looping construct.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (wasChanged SRF in targetlist handling)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)