Re: Script timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>
>



-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux