BUG #1314: STATEMENT_TIMEOUT DOES NOT WORK PROPERLY

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1314: STATEMENT_TIMEOUT DOES NOT WORK PROPERLY
Date: 2004-11-11 22:43:58
Message-ID: 20041111224358.02A8473870C@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1314
Logged by: Adnan DURSUN

Email address: adursun(at)hvkk(dot)mil(dot)tr

PostgreSQL version: 8.0 Beta

Operating system: W2K

Description: STATEMENT_TIMEOUT DOES NOT WORK PROPERLY

Details:

Hi, i use PostgreSQL 8 Beta4.I write a sf like that :
/////////
CREATE OR REPLACE FUNCTION fn_test()
RETURNS "varchar" AS
$BODY$
DECLARE
c refcursor;
r record;
BEGIN
SET SESSION STATEMENT_TIMEOUT = 1000;
OPEN C FOR SELECT * FROM T_KULLANICILAR FOR UPDATE;
FETCH C INTO R;
RESET STATEMENT_TIMEOUT;
RETURN '1';
EXCEPTION
WHEN QUERY_CANCELED THEN
RAISE EXCEPTION 'UNABLE TO OBTAIN LOCK... :%';
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
/////////
1.I RUN A THIS "SELECT * FROM T_KULLANICILAR FOR UPDATE" from another
session to lock T_KULLANICILAR table rows.
2.While T_KULLANICILAR table was locked,i called sf like "SELECT FN_TEST()"
from psql command prompt.But STATEMENT_TIMEOUT doesn't effect.
3.but i enter "SET SESSION STATEMENT_TIMEOUT = 1000;" command before step 2,
STATEMENT_TIMEOUT affects and cancel query.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2004-11-11 22:44:08 Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Previous Message PostgreSQL Bugs List 2004-11-11 19:55:30 BUG #1313: problems with array syntax parsing in SQL statements