Re: BUG #9198: psql -c 'SET; ...' not working - Mailing list pgsql-bugs

From Christoph Berg
Subject Re: BUG #9198: psql -c 'SET; ...' not working
Date
Msg-id 20140212130922.GC4409@msgid.df7cb.de
Whole thread Raw
In response to BUG #9198: psql -c 'SET; ...' not working  (christoph.berg@credativ.de)
List pgsql-bugs
Re: To pgsql-bugs@postgresql.org 2014-02-12 <20140212125626.2710.94912@wrig=
leys.postgresql.org>
> time psql -c "SET statement_timeout =3D '3s'; SELECT pg_sleep(2)"
> ERROR:  canceling statement due to statement timeout
> real    0m1.065s
>=20
> 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.
>=20
> 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.

The same problem occurs with statement_timeout from postgresql.conf
and from PGOPTIONS.

Christoph
--=20
cb@df7cb.de | http://www.df7cb.de/

pgsql-bugs by date:

Previous
From: christoph.berg@credativ.de
Date:
Subject: BUG #9198: psql -c 'SET; ...' not working
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #9190: Could not fsync file "pg_clog/0000": Bad file descriptor.