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

From Neil Conway
Subject Re: final light versions of Oracle compatibility (SQLSTATE,
Date
Msg-id 42A91601.8000203@samurai.com
Whole thread Raw
In response to Re: final light versions of Oracle compatibility (SQLSTATE, GREATEST,  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: final light versions of Oracle compatibility (SQLSTATE, GREATEST,
List pgsql-patches
Tom Lane wrote:
> Right, mid-rule actions were what I had in mind.  They're not uglier
> than introducing empty nonterminals

Well, IMHO they make the grammar rather hard to read when the action has
multiple lines (we would need at least 6 lines of code in the mid-rule
action, I believe). Unless we want two contiguous mid-rule actions
(which is even _less_ readable), we'll need to futz with adding another
member to %union to hold the two varnos the mid-rule action will
produce. Considering that the Bison manual suggests that it implements
mid-rule actions by introducing an implicit bogus non-terminal ([1]), I
don't think there is likely to be a difference in performance either
way, and I think mid-rule actions don't offer a notational improvement
in this case.

-Neil

[1]
http://www.gnu.org/software/bison/manual/html_mono/bison.html#Mid_002dRule-Actions,
toward the end of the section

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] PGPASSWORD and client tools
Next
From: Tom Lane
Date:
Subject: Re: final light versions of Oracle compatibility (SQLSTATE, GREATEST,