pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix YA unwanted behavioral difference with operator_precedence_w
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix YA unwanted behavioral difference with operator_precedence_w
@ 2017-02-15 19:44  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2017-02-15 19:44 UTC (permalink / raw)
  To: pgsql-committers

Fix YA unwanted behavioral difference with operator_precedence_warning.

Jeff Janes noted that the error cursor position shown for some errors
would vary when operator_precedence_warning is turned on.  We'd prefer
that option to have no undocumented effects, so this isn't desirable.
To fix, make sure that an AEXPR_PAREN node has the same exprLocation
as its child node.

(Note: it would be a little cheaper to use @2 here instead of an
exprLocation call, but there are cases where that wouldn't produce
the identical answer, so don't do it like that.)

Back-patch to 9.5 where this feature was introduced.

Discussion: https://postgr.es/m/CAMkU=1ykK+VhhcQ4Ky8KBo9FoaUJH3f3rDQB8TkTXi-ZsBRUkQ@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/01e0cbc4f687325b825e7953f99f0b16a2bd4e96

Modified Files
--------------
src/backend/parser/gram.y | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix YA unwanted behavioral difference with operator_precedence_w
@ 2017-02-15 19:44  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2017-02-15 19:44 UTC (permalink / raw)
  To: pgsql-committers

Fix YA unwanted behavioral difference with operator_precedence_warning.

Jeff Janes noted that the error cursor position shown for some errors
would vary when operator_precedence_warning is turned on.  We'd prefer
that option to have no undocumented effects, so this isn't desirable.
To fix, make sure that an AEXPR_PAREN node has the same exprLocation
as its child node.

(Note: it would be a little cheaper to use @2 here instead of an
exprLocation call, but there are cases where that wouldn't produce
the identical answer, so don't do it like that.)

Back-patch to 9.5 where this feature was introduced.

Discussion: https://postgr.es/m/CAMkU=1ykK+VhhcQ4Ky8KBo9FoaUJH3f3rDQB8TkTXi-ZsBRUkQ@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8350aae4f18a158980c17f56c39a707f4ac168cc

Modified Files
--------------
src/backend/parser/gram.y | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix YA unwanted behavioral difference with operator_precedence_w
@ 2017-02-15 19:44  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2017-02-15 19:44 UTC (permalink / raw)
  To: pgsql-committers

Fix YA unwanted behavioral difference with operator_precedence_warning.

Jeff Janes noted that the error cursor position shown for some errors
would vary when operator_precedence_warning is turned on.  We'd prefer
that option to have no undocumented effects, so this isn't desirable.
To fix, make sure that an AEXPR_PAREN node has the same exprLocation
as its child node.

(Note: it would be a little cheaper to use @2 here instead of an
exprLocation call, but there are cases where that wouldn't produce
the identical answer, so don't do it like that.)

Back-patch to 9.5 where this feature was introduced.

Discussion: https://postgr.es/m/CAMkU=1ykK+VhhcQ4Ky8KBo9FoaUJH3f3rDQB8TkTXi-ZsBRUkQ@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2b47e29f2081f7b2bbe99d240bdd08f63438357e

Modified Files
--------------
src/backend/parser/gram.y | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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


end of thread, other threads:[~2017-02-15 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 19:44 pgsql: Fix YA unwanted behavioral difference with operator_precedence_w Tom Lane <tgl@sss.pgh.pa.us>
2017-02-15 19:44 pgsql: Fix YA unwanted behavioral difference with operator_precedence_w Tom Lane <tgl@sss.pgh.pa.us>
2017-02-15 19:44 pgsql: Fix YA unwanted behavioral difference with operator_precedence_w 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