Re: BUG #9198: psql -c 'SET; ...' not working

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: BUG #9198: psql -c 'SET; ...' not working
Дата
Msg-id 1392307160231-5791870.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: BUG #9198: psql -c 'SET; ...' not working  (Matheus de Oliveira <matioli.matheus@gmail.com>)
Ответы Re: BUG #9198: psql -c 'SET; ...' not working  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Matheus de Oliveira wrote
> How if psql could handle multiple "-c" commands, something like this:
>
>     psql -c "SET statement_timetout = '3s'" -c "SELECT pg_sleep(2)"
>
> It wouldn't break existent applications and would make simpler to work on
> scripts.

I'm dubious this would be much of a realistic improvement in ease-of-use -
at least in the Linux/bash world where you are much better off constructing
some form of here-doc - and passing that in via standard input - if you need
to make use of multiple statements and usually want white-space to make
reading/maintaining those statements easier.

Not saying such an implementation wouldn't be accepted but it isn't the most
novel of ideas and it hasn't piqued anyone's interest enough to implement
thus far....

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-9198-psql-c-SET-not-working-tp5791581p5791870.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

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

Предыдущее
От: Matheus de Oliveira
Дата:
Сообщение: Re: BUG #9198: psql -c 'SET; ...' not working
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #9202: C Functions crash database too easily