Re: Script timeout
От | Federico |
---|---|
Тема | Re: Script timeout |
Дата | |
Msg-id | CAAOrQf0-kh3D5Ze9LaO=gY8RF6hb6ytj8nu8_b-Q7jfvi-h=VQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Script timeout (Roberto Grandi <roberto.grandi@trovaprezzi.it>) |
Ответы |
Re: Script timeout
|
Список | pgsql-admin |
This should work.
SELECT set_config('statement_timeout','1000 s',false);
The set_config function is quite flexible as can accept dynamic values.
I've used successfully to change the script timeout for each statement in my maintenance scripts using a temporary table to store the deadline.
Kind Regards
Federico
On 17 September 2013 17:23, Roberto Grandi <roberto.grandi@trovaprezzi.it> 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
Federico Campoli
DE MATERIALIZING, UK, Planet Earth, The Milky Way Galaxy
/*******************************
There's no point being grown-up if you can't be childish sometimes.
(The fourth Doctor)
http://www.pgdba.co.uk
*******************************/
В списке pgsql-admin по дате отправления: