pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma
@ 2019-02-24 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-24 17:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ecpg bugs caused by missing semicolons in the backend grammar.

The Bison documentation clearly states that a semicolon is required
after every grammar rule, and our scripts that generate ecpg's
grammar from the backend's implicitly assumed this is true.  But it
turns out that only ancient versions of Bison actually enforce that.
There have been a couple of rules without trailing semicolons in
gram.y for some time, and as a consequence, ecpg's grammar was faulty
and produced wrong output for the affected statements.

To fix, add the missing semis, and add some cross-checks to ecpg's
scripts so that they'll bleat if we mess this up again.

The cases that were broken were:
* "SET variable = DEFAULT" (but not "SET variable TO DEFAULT"),
  as well as allied syntaxes such as ALTER SYSTEM SET ... DEFAULT.
  These produced syntactically invalid output that the server
  would reject.
* Multiple type names in DROP TYPE/DOMAIN commands.  Only the
  first type name would be listed in the emitted command.

Per report from Daisuke Higuchi.  Back-patch to all supported versions.

Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905DB51CE@g01jpexmbkw24

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9e138a401d19acc2129ebfd37e7609589210ff67

Modified Files
--------------
src/backend/parser/gram.y                  |  2 ++
src/interfaces/ecpg/preproc/check_rules.pl | 10 +++++++++-
src/interfaces/ecpg/preproc/parse.pl       |  7 +++++++
3 files changed, 18 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma
@ 2019-02-24 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-24 17:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ecpg bugs caused by missing semicolons in the backend grammar.

The Bison documentation clearly states that a semicolon is required
after every grammar rule, and our scripts that generate ecpg's
grammar from the backend's implicitly assumed this is true.  But it
turns out that only ancient versions of Bison actually enforce that.
There have been a couple of rules without trailing semicolons in
gram.y for some time, and as a consequence, ecpg's grammar was faulty
and produced wrong output for the affected statements.

To fix, add the missing semis, and add some cross-checks to ecpg's
scripts so that they'll bleat if we mess this up again.

The cases that were broken were:
* "SET variable = DEFAULT" (but not "SET variable TO DEFAULT"),
  as well as allied syntaxes such as ALTER SYSTEM SET ... DEFAULT.
  These produced syntactically invalid output that the server
  would reject.
* Multiple type names in DROP TYPE/DOMAIN commands.  Only the
  first type name would be listed in the emitted command.

Per report from Daisuke Higuchi.  Back-patch to all supported versions.

Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905DB51CE@g01jpexmbkw24

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/de94ed89d5b013acf9729ac04e52166bbb8ca736

Modified Files
--------------
src/backend/parser/gram.y                  |  2 ++
src/interfaces/ecpg/preproc/check_rules.pl | 12 ++++++++++--
src/interfaces/ecpg/preproc/parse.pl       |  7 +++++++
3 files changed, 19 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma
@ 2019-02-24 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-24 17:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ecpg bugs caused by missing semicolons in the backend grammar.

The Bison documentation clearly states that a semicolon is required
after every grammar rule, and our scripts that generate ecpg's
grammar from the backend's implicitly assumed this is true.  But it
turns out that only ancient versions of Bison actually enforce that.
There have been a couple of rules without trailing semicolons in
gram.y for some time, and as a consequence, ecpg's grammar was faulty
and produced wrong output for the affected statements.

To fix, add the missing semis, and add some cross-checks to ecpg's
scripts so that they'll bleat if we mess this up again.

The cases that were broken were:
* "SET variable = DEFAULT" (but not "SET variable TO DEFAULT"),
  as well as allied syntaxes such as ALTER SYSTEM SET ... DEFAULT.
  These produced syntactically invalid output that the server
  would reject.
* Multiple type names in DROP TYPE/DOMAIN commands.  Only the
  first type name would be listed in the emitted command.

Per report from Daisuke Higuchi.  Back-patch to all supported versions.

Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905DB51CE@g01jpexmbkw24

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8ec638e69c01e589a3e0c11fbe9ad21c0a3549f1

Modified Files
--------------
src/backend/parser/gram.y                  |  2 ++
src/interfaces/ecpg/preproc/check_rules.pl | 12 ++++++++++--
src/interfaces/ecpg/preproc/parse.pl       |  8 ++++++++
3 files changed, 20 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma
@ 2019-02-24 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-24 17:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ecpg bugs caused by missing semicolons in the backend grammar.

The Bison documentation clearly states that a semicolon is required
after every grammar rule, and our scripts that generate ecpg's
grammar from the backend's implicitly assumed this is true.  But it
turns out that only ancient versions of Bison actually enforce that.
There have been a couple of rules without trailing semicolons in
gram.y for some time, and as a consequence, ecpg's grammar was faulty
and produced wrong output for the affected statements.

To fix, add the missing semis, and add some cross-checks to ecpg's
scripts so that they'll bleat if we mess this up again.

The cases that were broken were:
* "SET variable = DEFAULT" (but not "SET variable TO DEFAULT"),
  as well as allied syntaxes such as ALTER SYSTEM SET ... DEFAULT.
  These produced syntactically invalid output that the server
  would reject.
* Multiple type names in DROP TYPE/DOMAIN commands.  Only the
  first type name would be listed in the emitted command.

Per report from Daisuke Higuchi.  Back-patch to all supported versions.

Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905DB51CE@g01jpexmbkw24

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/904fce2a7695521d2cf25a3a08676f3c96d4096c

Modified Files
--------------
src/backend/parser/gram.y                  |  2 ++
src/interfaces/ecpg/preproc/check_rules.pl | 12 ++++++++++--
src/interfaces/ecpg/preproc/parse.pl       |  8 ++++++++
3 files changed, 20 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma
@ 2019-02-24 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-24 17:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ecpg bugs caused by missing semicolons in the backend grammar.

The Bison documentation clearly states that a semicolon is required
after every grammar rule, and our scripts that generate ecpg's
grammar from the backend's implicitly assumed this is true.  But it
turns out that only ancient versions of Bison actually enforce that.
There have been a couple of rules without trailing semicolons in
gram.y for some time, and as a consequence, ecpg's grammar was faulty
and produced wrong output for the affected statements.

To fix, add the missing semis, and add some cross-checks to ecpg's
scripts so that they'll bleat if we mess this up again.

The cases that were broken were:
* "SET variable = DEFAULT" (but not "SET variable TO DEFAULT"),
  as well as allied syntaxes such as ALTER SYSTEM SET ... DEFAULT.
  These produced syntactically invalid output that the server
  would reject.
* Multiple type names in DROP TYPE/DOMAIN commands.  Only the
  first type name would be listed in the emitted command.

Per report from Daisuke Higuchi.  Back-patch to all supported versions.

Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905DB51CE@g01jpexmbkw24

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3a682a21b7f9fcd996e282cd7c6d778e9a7febc2

Modified Files
--------------
src/backend/parser/gram.y                  |  2 ++
src/interfaces/ecpg/preproc/check_rules.pl | 12 ++++++++++--
src/interfaces/ecpg/preproc/parse.pl       |  8 ++++++++
3 files changed, 20 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma
@ 2019-02-24 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-24 17:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ecpg bugs caused by missing semicolons in the backend grammar.

The Bison documentation clearly states that a semicolon is required
after every grammar rule, and our scripts that generate ecpg's
grammar from the backend's implicitly assumed this is true.  But it
turns out that only ancient versions of Bison actually enforce that.
There have been a couple of rules without trailing semicolons in
gram.y for some time, and as a consequence, ecpg's grammar was faulty
and produced wrong output for the affected statements.

To fix, add the missing semis, and add some cross-checks to ecpg's
scripts so that they'll bleat if we mess this up again.

The cases that were broken were:
* "SET variable = DEFAULT" (but not "SET variable TO DEFAULT"),
  as well as allied syntaxes such as ALTER SYSTEM SET ... DEFAULT.
  These produced syntactically invalid output that the server
  would reject.
* Multiple type names in DROP TYPE/DOMAIN commands.  Only the
  first type name would be listed in the emitted command.

Per report from Daisuke Higuchi.  Back-patch to all supported versions.

Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905DB51CE@g01jpexmbkw24

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/53c2bb78db9f9bb47de14d61fc8b2a71cf1052ca

Modified Files
--------------
src/backend/parser/gram.y                  |  1 +
src/interfaces/ecpg/preproc/check_rules.pl | 12 ++++++++++--
src/interfaces/ecpg/preproc/parse.pl       |  8 ++++++++
3 files changed, 19 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2019-02-24 17:52 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-24 17:52 pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma Tom Lane <tgl@sss.pgh.pa.us>
2019-02-24 17:52 pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma Tom Lane <tgl@sss.pgh.pa.us>
2019-02-24 17:52 pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma Tom Lane <tgl@sss.pgh.pa.us>
2019-02-24 17:52 pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma Tom Lane <tgl@sss.pgh.pa.us>
2019-02-24 17:52 pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma Tom Lane <tgl@sss.pgh.pa.us>
2019-02-24 17:52 pgsql: Fix ecpg bugs caused by missing semicolons in the backend gramma Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox