Re: BUG #9198: psql -c 'SET; ...' not working
От | Matheus de Oliveira |
---|---|
Тема | Re: BUG #9198: psql -c 'SET; ...' not working |
Дата | |
Msg-id | CAJghg4Lo5t8jab6NnrLOnM9A2LNH_zajD_7TegiPCSvSGdqUDA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #9198: psql -c 'SET; ...' not working (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #9198: psql -c 'SET; ...' not working
|
Список | pgsql-bugs |
On Wed, Feb 12, 2014 at 1:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > christoph.berg@credativ.de writes: > > This seems to be a bug: > > > time psql -c "SET statement_timeout =3D '3s'; SELECT pg_sleep(2)" > > ERROR: canceling statement due to statement timeout > > real 0m1.065s > > > Many people have complained that it's unintuitive that -c works this way > rather than breaking up the string into multiple submissions the same way > psql would do with normal input. We're afraid to change it for fear of > breaking applications, though. If you want behavior more like psql's > normal operation, consider > > echo "SET statement_timeout =3D '3s'; SELECT pg_sleep(2)" | psql > > How if psql could handle multiple "-c" commands, something like this: psql -c "SET statement_timetout =3D '3s'" -c "SELECT pg_sleep(2)" It wouldn't break existent applications and would make simpler to work on scripts. Best regards, --=20 Matheus de Oliveira Analista de Banco de Dados Dextra Sistemas - MPS.Br n=EDvel F! www.dextra.com.br/postgres
В списке pgsql-bugs по дате отправления: