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

Поиск
Список
Период
Сортировка
От christoph.berg@credativ.de
Тема BUG #9198: psql -c 'SET; ...' not working
Дата
Msg-id 20140212125626.2710.94912@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #9198: psql -c 'SET; ...' not working  (Christoph Berg <christoph.berg@credativ.de>)
Re: BUG #9198: psql -c 'SET; ...' not working  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      9198
Logged by:          Christoph Berg
Email address:      christoph.berg@credativ.de
PostgreSQL version: 9.3.2
Operating system:   Linux
Description:

This seems to be a bug:

# alter role cbe set statement_timeout = '1s';

psql -c "SHOW statement_timeout"
 statement_timeout
-------------------
 1s

psql -c "SET statement_timeout = '3s'; SHOW statement_timeout"
 statement_timeout
-------------------
 3s

time psql -c "SET statement_timeout = '3s'; SELECT pg_sleep(2)"
ERROR:  canceling statement due to statement timeout
real    0m1.065s

As witnessed by the time output, the timeout is the one from ALTER ROLE, not
the new one. Seen on 9.2 and 9.3.

The psql docs mention that -c is treated differently from stdin when
multiple commands are executed, but that shouldn't include SET not getting
into effect.

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

Предыдущее
От: Tomonari Katsumata
Дата:
Сообщение: Re: BUG #8470: 9.3 locking/subtransaction performance regression
Следующее
От: Christoph Berg
Дата:
Сообщение: Re: BUG #9198: psql -c 'SET; ...' not working