pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix grammar's AND/OR flattening to work with operator_precedence 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix grammar's AND/OR flattening to work with operator_precedence @ 2016-06-03 23:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-06-03 23:12 UTC (permalink / raw) To: pgsql-committers Fix grammar's AND/OR flattening to work with operator_precedence_warning. It'd be good for "(x AND y) AND z" to produce a three-child AND node whether or not operator_precedence_warning is on, but that failed to happen when it's on because makeAndExpr() didn't look through the added AEXPR_PAREN node. This has no effect on generated plans because prepqual.c would flatten the AND nest anyway; but it does affect the number of parens printed in ruleutils.c, for example. I'd already fixed some similar hazards in parse_expr.c in commit abb164655, but didn't think to search gram.y for problems of this ilk. Per gripe from Jean-Pierre Pelletier. Report: <fa0535ec6d6428cfec40c7e8a6d11156@mail.gmail.com> Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/c82037e372394ee046e278887c8f938591ca7406 Modified Files -------------- src/backend/parser/gram.y | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 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] 2+ messages in thread
* pgsql: Fix grammar's AND/OR flattening to work with operator_precedence @ 2016-06-03 23:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2016-06-03 23:12 UTC (permalink / raw) To: pgsql-committers Fix grammar's AND/OR flattening to work with operator_precedence_warning. It'd be good for "(x AND y) AND z" to produce a three-child AND node whether or not operator_precedence_warning is on, but that failed to happen when it's on because makeAndExpr() didn't look through the added AEXPR_PAREN node. This has no effect on generated plans because prepqual.c would flatten the AND nest anyway; but it does affect the number of parens printed in ruleutils.c, for example. I'd already fixed some similar hazards in parse_expr.c in commit abb164655, but didn't think to search gram.y for problems of this ilk. Per gripe from Jean-Pierre Pelletier. Report: <fa0535ec6d6428cfec40c7e8a6d11156@mail.gmail.com> Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/05104f693646c0a4ae446e79cb89057497da17e4 Modified Files -------------- src/backend/parser/gram.y | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 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] 2+ messages in thread
end of thread, other threads:[~2016-06-03 23:12 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-06-03 23:12 pgsql: Fix grammar's AND/OR flattening to work with operator_precedence Tom Lane <tgl@sss.pgh.pa.us> 2016-06-03 23:12 pgsql: Fix grammar's AND/OR flattening to work with operator_precedence 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