Re: Script timeout - Mailing list pgsql-admin

From Patrick KUI-LI
Subject Re: Script timeout
Date
Msg-id 52405107.9030304@hi-media.com
Whole thread Raw
In response to Script timeout  (Roberto Grandi <roberto.grandi@trovaprezzi.it>)
List 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
atthe 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
>
>



pgsql-admin by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: accidentally deleted data directory
Next
From: Thara Vadakkeveedu
Date:
Subject: accidentally deleted data directory