Re: plpgsql: another new reserved word - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: plpgsql: another new reserved word
Date
Msg-id e51f66da0711260225w30fca8f4xfb2fcaa09e56cbb4@mail.gmail.com
Whole thread Raw
In response to Re: plpgsql: another new reserved word  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plpgsql: another new reserved word  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 11/10/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The current plpgsql code seems to be designed to force a qualifier to be
> interpreted as a block label if at all possible, even if there are
> more-closely-nested alternative interpretations; so in the above example
> it would assign to the outer variable bar.  This seems a tad bogus
> to me.  Can anyone comment on how Oracle handles cases like this?

Some googling brought following link:
http://download-uk.oracle.com/docs/cd/B14117_01/appdev.101/b10807/d_names.htm

I have not parsed it completely, but rule seems simple - inner
scope overrides outer one and no magic on unqualified idents,
if ident is unqualified, it wont be matched to schema, block
or some other qualifier.  (well, at least no such magic behaviour
is mentioned.)

-- 
marko


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: 8.3devel slower than 8.2 under read-only load
Next
From: Simon Riggs
Date:
Subject: Re: Autovacuum and OldestXmin