From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: statement_timeout doesnt work within plpgsql by design? |
Date: | 2007-02-20 19:46:34 |
Message-ID: | 200702201446.34139.xzilla@users.sourceforge.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tuesday 20 February 2007 12:50, Tom Lane wrote:
> Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> > pagila=# create or replace function test() returns bool as $$ begin set
> > statement_timeout = 3000; perform pg_sleep(4) ; return true; end $$
> > language plpgsql;
> > CREATE FUNCTION
>
> statement_timeout is measured across an entire interactive command, not
> individual commands within a function; and the timeout that applies to
> an interactive command is determined at its beginning. So the above
> doesn't do what you think.
>
Well, I'd be happy if it caused the entire function to bail out or if it
caused individual statements within a function to bail out, but it does
neither. I can see how that would be a bit tricky to implement though.
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
From | Date | Subject | |
---|---|---|---|
Next Message | Jonah H. Harris | 2007-02-20 19:48:44 | Re: New feature request: FlashBack Query |
Previous Message | Jim C. Nasby | 2007-02-20 19:01:03 | Re: autovacuum next steps |