From 546b71ac18a7527386c51509dbe23d93febf2aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Thu, 25 Jul 2019 21:21:00 +0000 Subject: [PATCH] multi_router_planner: be terse for ctes with false wheres --- src/test/regress/expected/multi_router_planner.out | 5 +++-- src/test/regress/sql/multi_router_planner.sql | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/test/regress/expected/multi_router_planner.out b/src/test/regress/expected/multi_router_planner.out index d28d41244..926f4a158 100644 --- a/src/test/regress/expected/multi_router_planner.out +++ b/src/test/regress/expected/multi_router_planner.out @@ -1573,12 +1573,13 @@ DETAIL: distribution column value: 1 (0 rows) -- CTEs with where false +-- terse because distribution column inference varies between pg11 & pg12 +\set VERBOSITY terse WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1), id_title AS (SELECT id, title from articles_hash WHERE author_id = 1 and 1=0) SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id; DEBUG: Creating router plan DEBUG: Plan is router executable -DETAIL: distribution column value: 1 id | author_id | id | title ----+-----------+----+------- (0 rows) @@ -1588,11 +1589,11 @@ id_title AS (SELECT id, title from articles_hash WHERE author_id = 1) SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id and 1=0; DEBUG: Creating router plan DEBUG: Plan is router executable -DETAIL: distribution column value: 1 id | author_id | id | title ----+-----------+----+------- (0 rows) +\set VERBOSITY DEFAULT WITH RECURSIVE hierarchy as ( SELECT *, 1 AS level FROM company_employees diff --git a/src/test/regress/sql/multi_router_planner.sql b/src/test/regress/sql/multi_router_planner.sql index dcc4a1f38..74145a19a 100644 --- a/src/test/regress/sql/multi_router_planner.sql +++ b/src/test/regress/sql/multi_router_planner.sql @@ -681,6 +681,9 @@ INTERSECT (SELECT * FROM articles_hash WHERE author_id = 2 and 1=0); -- CTEs with where false +-- terse because distribution column inference varies between pg11 & pg12 +\set VERBOSITY terse + WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1), id_title AS (SELECT id, title from articles_hash WHERE author_id = 1 and 1=0) SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id; @@ -689,6 +692,8 @@ WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1) id_title AS (SELECT id, title from articles_hash WHERE author_id = 1) SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id and 1=0; +\set VERBOSITY DEFAULT + WITH RECURSIVE hierarchy as ( SELECT *, 1 AS level FROM company_employees