From: | christoph(dot)berg(at)credativ(dot)de |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #9198: psql -c 'SET; ...' not working |
Date: | 2014-02-12 12:56:26 |
Message-ID: | 20140212125626.2710.94912@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 9198
Logged by: Christoph Berg
Email address: christoph(dot)berg(at)credativ(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Christoph Berg | 2014-02-12 13:09:22 | Re: BUG #9198: psql -c 'SET; ...' not working |
Previous Message | Praveen kumar reddy Thukivakam | 2014-02-12 07:21:53 | Need Information |