Re: BUG #1956: Plpgsql top-level DECLARE does not share scope

From: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Karl O(dot)Pinc <kop(at)meme(dot)com>, pgsql-bugs(at)postgresql(dot)org, Jim C(dot)Nasby <jnasby(at)pervasive(dot)com>
Subject: Re: BUG #1956: Plpgsql top-level DECLARE does not share scope
Date: 2005-10-17 00:44:15
Message-ID: 4352F3DF22A.0024KG@129.180.47.120
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 13 Oct 2005 16:24:23 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> BTW, another issue here is that if we did merge the first DECLARE with
> the scope of auto-declared variables, it would be a non backwards
> compatible change. Right now you can do, say,
>
> declare found int;
>
> and it'll override the standard FOUND variable. If we change this then
> you'd get an error. (Of course, it could be argued that that would be
> a Good Thing. But it would inhibit us from adding new auto-declared
> variables that are less central to the language than FOUND, because of
> the risk of breaking existing code.)

Could something be done using alias?

eg
declare x int;
...
declare x alias for outer x

klint.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message jayesh 2005-10-17 04:52:02 BUG #1969: Unable to Install
Previous Message Martin Pitt 2005-10-16 09:45:20 Re: BUG #1963: SSL certificate permission check is too strict