mirror of https://github.com/citusdata/citus.git
multi_router_planner: be terse for ctes with false wheres
parent
a523a5b773
commit
546b71ac18
|
@ -1573,12 +1573,13 @@ DETAIL: distribution column value: 1
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
-- CTEs with where false
|
-- 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),
|
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)
|
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;
|
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||||
DEBUG: Creating router plan
|
DEBUG: Creating router plan
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DETAIL: distribution column value: 1
|
|
||||||
id | author_id | id | title
|
id | author_id | id | title
|
||||||
----+-----------+----+-------
|
----+-----------+----+-------
|
||||||
(0 rows)
|
(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;
|
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id and 1=0;
|
||||||
DEBUG: Creating router plan
|
DEBUG: Creating router plan
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DETAIL: distribution column value: 1
|
|
||||||
id | author_id | id | title
|
id | author_id | id | title
|
||||||
----+-----------+----+-------
|
----+-----------+----+-------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
|
\set VERBOSITY DEFAULT
|
||||||
WITH RECURSIVE hierarchy as (
|
WITH RECURSIVE hierarchy as (
|
||||||
SELECT *, 1 AS level
|
SELECT *, 1 AS level
|
||||||
FROM company_employees
|
FROM company_employees
|
||||||
|
|
|
@ -681,6 +681,9 @@ INTERSECT
|
||||||
(SELECT * FROM articles_hash WHERE author_id = 2 and 1=0);
|
(SELECT * FROM articles_hash WHERE author_id = 2 and 1=0);
|
||||||
|
|
||||||
-- CTEs with where false
|
-- 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),
|
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)
|
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;
|
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)
|
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;
|
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id and 1=0;
|
||||||
|
|
||||||
|
\set VERBOSITY DEFAULT
|
||||||
|
|
||||||
WITH RECURSIVE hierarchy as (
|
WITH RECURSIVE hierarchy as (
|
||||||
SELECT *, 1 AS level
|
SELECT *, 1 AS level
|
||||||
FROM company_employees
|
FROM company_employees
|
||||||
|
|
Loading…
Reference in New Issue