pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix dumping of outer joins with empty qual lists. 5+ messages / 1 participants [nested] [flat]
* pgsql: Fix dumping of outer joins with empty qual lists. @ 2017-07-20 15:29 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2017-07-20 15:29 UTC (permalink / raw) To: pgsql-committers Fix dumping of outer joins with empty qual lists. Normally, a JoinExpr would have empty "quals" only if it came from CROSS JOIN syntax. However, it's possible to get to this state by specifying NATURAL JOIN between two tables with no common column names, and there might be other ways too. The code previously printed no ON clause if "quals" was empty; that's right for CROSS JOIN but syntactically invalid if it's some type of outer join. Fix by printing ON TRUE in that case. This got broken by commit 2ffa740be, which stopped using NATURAL JOIN syntax in ruleutils output due to its brittleness in the face of column renamings. Back-patch to 9.3 where that commit appeared. Per report from Tushar Ahuja. Discussion: https://postgr.es/m/98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/eb145fdfea91ee5dc6d7aad0309527f810f7c90a Modified Files -------------- src/backend/utils/adt/ruleutils.c | 5 +++++ src/test/regress/expected/create_view.out | 29 +++++++++++++++++++++++++++++ src/test/regress/sql/create_view.sql | 10 ++++++++++ 3 files changed, 44 insertions(+) -- 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] 5+ messages in thread
* pgsql: Fix dumping of outer joins with empty qual lists. @ 2017-07-20 15:29 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2017-07-20 15:29 UTC (permalink / raw) To: pgsql-committers Fix dumping of outer joins with empty qual lists. Normally, a JoinExpr would have empty "quals" only if it came from CROSS JOIN syntax. However, it's possible to get to this state by specifying NATURAL JOIN between two tables with no common column names, and there might be other ways too. The code previously printed no ON clause if "quals" was empty; that's right for CROSS JOIN but syntactically invalid if it's some type of outer join. Fix by printing ON TRUE in that case. This got broken by commit 2ffa740be, which stopped using NATURAL JOIN syntax in ruleutils output due to its brittleness in the face of column renamings. Back-patch to 9.3 where that commit appeared. Per report from Tushar Ahuja. Discussion: https://postgr.es/m/98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com Branch ------ REL9_3_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e947838ae432579d86fa35f0b4d6a384c20d4824 Modified Files -------------- src/backend/utils/adt/ruleutils.c | 5 +++++ src/test/regress/expected/create_view.out | 29 +++++++++++++++++++++++++++++ src/test/regress/sql/create_view.sql | 10 ++++++++++ 3 files changed, 44 insertions(+) -- 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] 5+ messages in thread
* pgsql: Fix dumping of outer joins with empty qual lists. @ 2017-07-20 15:29 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2017-07-20 15:29 UTC (permalink / raw) To: pgsql-committers Fix dumping of outer joins with empty qual lists. Normally, a JoinExpr would have empty "quals" only if it came from CROSS JOIN syntax. However, it's possible to get to this state by specifying NATURAL JOIN between two tables with no common column names, and there might be other ways too. The code previously printed no ON clause if "quals" was empty; that's right for CROSS JOIN but syntactically invalid if it's some type of outer join. Fix by printing ON TRUE in that case. This got broken by commit 2ffa740be, which stopped using NATURAL JOIN syntax in ruleutils output due to its brittleness in the face of column renamings. Back-patch to 9.3 where that commit appeared. Per report from Tushar Ahuja. Discussion: https://postgr.es/m/98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6ab4a1136ed949fa77e74d97dd4fecdb8bc8c380 Modified Files -------------- src/backend/utils/adt/ruleutils.c | 5 +++++ src/test/regress/expected/create_view.out | 29 +++++++++++++++++++++++++++++ src/test/regress/sql/create_view.sql | 10 ++++++++++ 3 files changed, 44 insertions(+) -- 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] 5+ messages in thread
* pgsql: Fix dumping of outer joins with empty qual lists. @ 2017-07-20 15:29 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2017-07-20 15:29 UTC (permalink / raw) To: pgsql-committers Fix dumping of outer joins with empty qual lists. Normally, a JoinExpr would have empty "quals" only if it came from CROSS JOIN syntax. However, it's possible to get to this state by specifying NATURAL JOIN between two tables with no common column names, and there might be other ways too. The code previously printed no ON clause if "quals" was empty; that's right for CROSS JOIN but syntactically invalid if it's some type of outer join. Fix by printing ON TRUE in that case. This got broken by commit 2ffa740be, which stopped using NATURAL JOIN syntax in ruleutils output due to its brittleness in the face of column renamings. Back-patch to 9.3 where that commit appeared. Per report from Tushar Ahuja. Discussion: https://postgr.es/m/98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/41ada83774929c3bbb069a90f2aa3a8ac508e876 Modified Files -------------- src/backend/utils/adt/ruleutils.c | 5 +++++ src/test/regress/expected/create_view.out | 29 +++++++++++++++++++++++++++++ src/test/regress/sql/create_view.sql | 10 ++++++++++ 3 files changed, 44 insertions(+) -- 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] 5+ messages in thread
* pgsql: Fix dumping of outer joins with empty qual lists. @ 2017-07-20 15:29 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 5+ messages in thread From: Tom Lane @ 2017-07-20 15:29 UTC (permalink / raw) To: pgsql-committers Fix dumping of outer joins with empty qual lists. Normally, a JoinExpr would have empty "quals" only if it came from CROSS JOIN syntax. However, it's possible to get to this state by specifying NATURAL JOIN between two tables with no common column names, and there might be other ways too. The code previously printed no ON clause if "quals" was empty; that's right for CROSS JOIN but syntactically invalid if it's some type of outer join. Fix by printing ON TRUE in that case. This got broken by commit 2ffa740be, which stopped using NATURAL JOIN syntax in ruleutils output due to its brittleness in the face of column renamings. Back-patch to 9.3 where that commit appeared. Per report from Tushar Ahuja. Discussion: https://postgr.es/m/98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c2bbec9f2b3672f57be27e20f26db141ab430da8 Modified Files -------------- src/backend/utils/adt/ruleutils.c | 5 +++++ src/test/regress/expected/create_view.out | 29 +++++++++++++++++++++++++++++ src/test/regress/sql/create_view.sql | 10 ++++++++++ 3 files changed, 44 insertions(+) -- 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] 5+ messages in thread
end of thread, other threads:[~2017-07-20 15:29 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-07-20 15:29 pgsql: Fix dumping of outer joins with empty qual lists. Tom Lane <tgl@sss.pgh.pa.us> 2017-07-20 15:29 pgsql: Fix dumping of outer joins with empty qual lists. Tom Lane <tgl@sss.pgh.pa.us> 2017-07-20 15:29 pgsql: Fix dumping of outer joins with empty qual lists. Tom Lane <tgl@sss.pgh.pa.us> 2017-07-20 15:29 pgsql: Fix dumping of outer joins with empty qual lists. Tom Lane <tgl@sss.pgh.pa.us> 2017-07-20 15:29 pgsql: Fix dumping of outer joins with empty qual lists. 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