Re: strange problem with pl/pgsql function caching of bad values - Mailing list pgsql-general

From snacktime
Subject Re: strange problem with pl/pgsql function caching of bad values
Date
Msg-id 1f060c4c05071112046b222d8d@mail.gmail.com
Whole thread Raw
In response to Re: strange problem with pl/pgsql function caching of bad values  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> > One other thing about our particular setup is that we use separate
> > schema's for all user data and the functions go in the public schema.
> > So before executing this function we issue something like 'set_path to
> > username,public'.
>
> Mph.  Are you expecting the function to work for more than one such path
> value over the life of a connection?  Maybe you need to do the selection
> part with an EXECUTE not only the update.  As-is, the first execution
> will latch down which copy of recurbilling_transactions will be used
> for the selection, regardless of later changes in search_path.
>

Argh...  I knew better.  Yes i need to use EXECUTE because it is used
across multiple paths.

Chris

pgsql-general by date:

Previous
From: "Karl O. Pinc"
Date:
Subject: Db and schema names in logged errors
Next
From: "Karl O. Pinc"
Date:
Subject: Re: A trigger that acts on a column with a given column