Re: [HACKERS] merging some features from plpgsql2 project - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] merging some features from plpgsql2 project
Date
Msg-id 173d47e1-3aad-5d59-c902-1715c3ce5bc1@BlueTreble.com
Whole thread Raw
In response to Re: [HACKERS] merging some features from plpgsql2 project  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] merging some features from plpgsql2 project  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 1/7/17 8:53 PM, Tom Lane wrote:
> If FOUND were declared at an outer scoping level such that any
> user-created declaration overrode the name, then we could do likewise
> for other auto variables and not fear compatibility breaks.
>
> Currently, though, we don't seem to be quite there: it looks like
> FOUND is an outer variable with respect to DECLARE blocks, but it's
> more closely nested than parameter names.

Sorry, I'm not following... you can override a parameter name the same 
way and get the same behavior, no?

BTW, I do wish you could change the label of the scope that arguments 
went into, so that you could use that label to refer to function 
parameters. If we allowed that it'd perhaps be the best of both worlds: 
you'd be guaranteed access to all auto variables and parameters, and 
that access wouldn't need to be tied to the function name (which can be 
both painful and error prone).
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] ICU integration
Next
From: Jim Nasby
Date:
Subject: Re: [HACKERS] pg_background contrib module proposal