Re: Statement_timeout in procedure block - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Statement_timeout in procedure block
Date
Msg-id f53ee50dee32d8040be119234537dbb66562b981.camel@cybertec.at
Whole thread Raw
In response to Re: Statement_timeout in procedure block  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Wed, 2024-06-19 at 10:58 -0400, Tom Lane wrote:
> Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > What works is setting the parameter on the procedure:
>
> > test=> CREATE OR REPLACE PROCEDURE sit() LANGUAGE plpgsql SET statement_timeout = 2000 AS 'BEGIN PERFORM
pg_sleep(5);END;'; 
> > CREATE PROCEDURE
>
> That doesn't work either, for me, and I would not expect any of these
> variants to do so.

Ah, you are right.

It was the SET statement in the previous incarnation of the procedure that
had changed the parameter for my database session.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Statement_timeout in procedure block
Next
From: Kenneth Barber
Date:
Subject: Excluding event triggers from a pg_dump