| From: | Patrick KUI-LI <pkuili(at)hi-media(dot)com> |
|---|---|
| To: | Roberto Grandi <roberto(dot)grandi(at)trovaprezzi(dot)it>, pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: Script timeout |
| Date: | 2013-09-23 14:32:39 |
| Message-ID: | 52405107.9030304@hi-media.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
Hi ,
When you don't specify unit, it's in ms.
See the test bellow:
BR
Patrick KUI-LI
postgres=# SET statement_timeout TO 1000;
SET
Time: 0.214 ms
postgres=# show statement_timeout;
statement_timeout
-------------------
1s
(1 row)
Example with unit:
postgres=# SET statement_timeout TO '1000s';
SET
Time: 0.229 ms
postgres=# SELECT pg_sleep(2);
pg_sleep
----------
(1 row)
Time: 2001.566 ms
postgres=#
On 09/17/2013 06:23 PM, Roberto Grandi wrote:
> Dear all,
>
> i would set a script timeout from a .net application. My problem regards how to make sure that time out will be reset at the end of the script such as
>
> SET statement_timeout 1000
> SELECT pg_sleep(2);
>
> trowhs exception
>
>
> After that
>
> SELECT pg_sleep(2);
>
> wouldn't throw exception.
>
>
> Can you help me to solve this issue?
>
> Many thanks in advance.
>
> BR
> Roberto
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thara Vadakkeveedu | 2013-09-23 22:36:22 | accidentally deleted data directory |
| Previous Message | Albe Laurenz | 2013-09-23 10:48:03 | Re: accidentally deleted data directory |