Re: [Bug Fix] ECPG: could not use set xxx to default statement
Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Meskes <meskes@postgresql.org>,
"Higuchi, Daisuke" <higuchi.daisuke@jp.fujitsu.com>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2019-02-19T14:47:31Z
Lists: pgsql-hackers
On 2/19/19 9:29 AM, Tom Lane wrote:
> Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
>> I just looked at the bison manual at gnu.org and also at `info bison` on
>> my local machine, and couldn't see any reference to semicolons being
>> optional at the end of a rule. Under the heading "Syntax of Grammar
>> Rules" it says this:
>> A Bison grammar rule has the following general form:
>> RESULT: COMPONENTS...;
>> Making it optional without putting that in the manual is just awful.
> Yeah. I wonder if they removed that info in 1.34 and failed to
> put it back in 1.875?
>
> Anyway, I'm of the opinion that omitting the semi is poor style
> and our tools should insist on it even if Bison does not. Thus,
> I think the correct fix is for the scripts to complain about a
> missing semi, not cope.
Yeah, agreed.
>
> My initial look at parse.pl last night left me feeling pretty
> disheartened about its robustness in general --- for example,
> it looks like { } /* or */ inside a string literal or Bison
> character token would break it completely, because it wouldn't
> distinguish those cases from the same things outside a string.
> It's just luck we haven't broken it yet (or, perhaps, we have
> and nobody exercised the relevant productions yet?).
>
> Probably, somebody who's a better Perl programmer than me
> ought to take point on improving that.
>
>
Agreed.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Fix ecpg bugs caused by missing semicolons in the backend grammar.
- 53c2bb78db9f 9.4.22 landed
- 3a682a21b7f9 9.5.17 landed
- de94ed89d5b0 11.3 landed
- 9e138a401d19 12.0 landed
- 904fce2a7695 9.6.13 landed
- 8ec638e69c01 10.8 landed