Re: final light versions of Oracle compatibility (SQLSTATE, GREATEST, - Mailing list pgsql-patches

From Tom Lane
Subject Re: final light versions of Oracle compatibility (SQLSTATE, GREATEST,
Date
Msg-id 17602.1118375238@sss.pgh.pa.us
Whole thread Raw
In response to Re: final light versions of Oracle compatibility (SQLSTATE,  (Neil Conway <neilc@samurai.com>)
Responses Re: final light versions of Oracle compatibility (SQLSTATE,  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> Tom Lane wrote:
>> I still find the grammar changes to be an ugly kluge --- it should be
>> possible to do this without introducing bogus nonterminals.

> The scope-local variables need to be added to the namespace by the time
> that we parse the WHEN clauses. I can see two ways to do that: adding a
> bogus non-terminal, or using a mid-rule action. Mid-rule actions are
> pretty ugly, though. Is there a better alternative?

Right, mid-rule actions were what I had in mind.  They're not uglier
than introducing empty nonterminals --- and in fact plpgsql's grammar
already relies on 'em.  The cursor variable declaration production
(about line 359 in CVS tip) seems to me to offer a very direct parallel
to what we want to do here.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: plperl features
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] PGPASSWORD and client tools