Re: [Bug Fix] ECPG: could not use set xxx to default statement
Michael Meskes <meskes@postgresql.org>
From: Michael Meskes <meskes@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>, "Higuchi, Daisuke" <higuchi.daisuke@jp.fujitsu.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2019-02-19T09:26:51Z
Lists: pgsql-hackers
On Tue, 2019-02-19 at 00:05 -0500, Tom Lane wrote: > I wrote: > > "Higuchi, Daisuke" <higuchi.daisuke@jp.fujitsu.com> writes: > > > [ missing semicolon in gram.y breaks ecpg parsing of same > > > construct ] > > That's pretty nasty. The fix in gram.y is certainly needed, but > > I'm > > unexcited by the regression test additions you propose. What I > > really > > want to know is why a syntax error in gram.y wasn't detected by any > > of the tools we use, I'm actually surprised it only shows by one incorrectly working rule and did not mangle the whole file by combining to rules. I guess that's because bison now finds the end of the rule somehow even without the semicolon. > But it doesn't. It seems though that our conversion script for > creating > preproc.y depends on there being semicolons. Yes, it does. There has to be a way for the script to find the end of a rule and I wonder if bison's way can be used in such a simple perl script too. > I think we need to fix that script to either cope with missing > semicolons, > or at least complain about them. Too tired to look into how, right > now. If we can identify a missing semicolon we probably can also figure out where it had to be. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Meskes at (Debian|Postgresql) dot Org Jabber: michael at xmpp dot meskes dot org VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL
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