From: Patrick KUI-LI <pkuili@hi-media.com>
To: Roberto Grandi <roberto.grandi@trovaprezzi.it>
To: pgsql-admin@postgresql.org
Subject: Re: Script timeout
Date: Mon, 23 Sep 2013 16:32:39 +0200
Message-ID: <52405107.9030304@hi-media.com> (raw)
In-Reply-To: <326366447.356781.1379435002810.JavaMail.root@trovaprezzi.it>
References: <326366447.356781.1379435002810.JavaMail.root@trovaprezzi.it>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
>
>
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: pkuili@hi-media.com, roberto.grandi@trovaprezzi.it
Subject: Re: Script timeout
In-Reply-To: <52405107.9030304@hi-media.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox