Re: Specific names for plpgsql variable-resolution control options? - Mailing list pgsql-hackers

From Sam Mason
Subject Re: Specific names for plpgsql variable-resolution control options?
Date
Msg-id 20091109014435.GD5407@samason.me.uk
Whole thread Raw
In response to Re: Specific names for plpgsql variable-resolution control options?  ("David E. Wheeler" <david@kineticode.com>)
List pgsql-hackers
On Fri, Nov 06, 2009 at 07:09:46PM -0800, David E. Wheeler wrote:
> On Nov 6, 2009, at 6:57 PM, Tom Lane wrote:
> >If we do that, presumably the per-function syntax would be
> >    #variable_conflict variable_first
> >and so on, which is clear enough but might be thought a bit verbose
> >for something people might be pasting into hundreds of functions.
> 
> I suspect that most folks will set the GUC and few will actually use  
> it in functions.

Just to be clear about the semantics; what should happen if the user
doesn't specify a value for the function?  Should PG remember the GUC
value at creation time, or pull it in at invocation time?  I'd lean
towards fixing it at function creation time as it'd be one more caveat
for "security definer" functions otherwise.

--  Sam  http://samason.me.uk/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Specific names for plpgsql variable-resolution control options?
Next
From: Robert Haas
Date:
Subject: next CommitFest