Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VO7Hd-0005gt-7F for pgsql-admin@arkaria.postgresql.org; Mon, 23 Sep 2013 14:38:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VO7Hc-0001fr-HO for pgsql-admin@arkaria.postgresql.org; Mon, 23 Sep 2013 14:38:40 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VO7Hb-0001eK-41 for pgsql-admin@postgresql.org; Mon, 23 Sep 2013 14:38:39 +0000 Received: from smtp.hi-media.com ([46.182.41.82]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VO7HU-0004lm-AF for pgsql-admin@postgresql.org; Mon, 23 Sep 2013 14:38:38 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.hi-media.com (Postfix) with ESMTP id 6556B6E00F3 for ; Mon, 23 Sep 2013 16:38:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at smtp.hi-media.com Received: from smtp.hi-media.com ([127.0.0.1]) by localhost (smtp1-gs.backbone.hi-media-techno.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tl0FM3LyvZF8 for ; Mon, 23 Sep 2013 16:38:25 +0200 (CEST) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by smtp.hi-media.com (Postfix) with ESMTP id B2D546E00F9 for ; Mon, 23 Sep 2013 16:38:25 +0200 (CEST) Received: by mail-we0-f172.google.com with SMTP id w61so3178755wes.17 for ; Mon, 23 Sep 2013 07:38:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=HNR+qwNijZ6BY99zvfbOtaExKHOjwEDTSj5XWnyH6qY=; b=DfZZQTpdM7bPAy5iy88K2C3XMzpOrWlVNtPD4/u8rXSnci4w7bW0JsF9E6+a91qkBB 5Tv+/cJluSSD/uJ7p6XNSFfbkqufpvbbqNIz3c0gClOZf3N/Ukm9rwOsCXkk/12wQI3H n6rcyFWmlGQ/M9ZxuCO4+/9tI6YPPaLZ4njnibvock3xQv/EeeLgJm1YxNoBZLQ0xM5q 5ar5Mc7684QJG/mnazVlY+GHJFbPRlCuxsFbQMU2tDlm4OLmmi8SC64wx0IR2K7VmJgA kxkEHEUEiunUwtj3H7rOtPjGMdBBmyaUIXw5L5EmnB7aLIIfn6gHhcVpOq8SS98W11Vj MrYg== X-Received: by 10.180.219.33 with SMTP id pl1mr13892577wic.49.1379947105546; Mon, 23 Sep 2013 07:38:25 -0700 (PDT) X-Gm-Message-State: ALoCoQnn1uen5yIBMiIzI7MAGENQrNXqkYZy5xkHhuIPdKXcVT2Z8v2ZcHTLEzJvwRhEwQV+eWUKRutWncnf8KKg9WXbKq5l2np05rLj5hVKytsorTnl7y70euVXkkbalGHHlTw/kjU4CUYQVg7pEILsNmk9lnv2suo14CpiX872pUmOowgK9rI= X-Received: by 10.180.219.33 with SMTP id pl1mr13873113wic.49.1379946765005; Mon, 23 Sep 2013 07:32:45 -0700 (PDT) Received: from [10.75.0.64] ([83.167.62.196]) by mx.google.com with ESMTPSA id b11sm25838755wik.1.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Sep 2013 07:32:41 -0700 (PDT) Message-ID: <52405107.9030304@hi-media.com> Date: Mon, 23 Sep 2013 16:32:39 +0200 From: Patrick KUI-LI User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Roberto Grandi , pgsql-admin@postgresql.org Subject: Re: Script timeout References: <326366447.356781.1379435002810.JavaMail.root@trovaprezzi.it> In-Reply-To: <326366447.356781.1379435002810.JavaMail.root@trovaprezzi.it> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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