diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/file_fdw/expected/file_fdw.out | 1 | ||||
-rw-r--r-- | contrib/pg_overexplain/expected/pg_overexplain.out | 6 | ||||
-rw-r--r-- | contrib/pg_overexplain/pg_overexplain.c | 12 | ||||
-rw-r--r-- | contrib/postgres_fdw/expected/postgres_fdw.out | 9 |
4 files changed, 23 insertions, 5 deletions
diff --git a/contrib/file_fdw/expected/file_fdw.out b/contrib/file_fdw/expected/file_fdw.out index 246e3d3e566..5121e27dce5 100644 --- a/contrib/file_fdw/expected/file_fdw.out +++ b/contrib/file_fdw/expected/file_fdw.out @@ -322,6 +322,7 @@ SET constraint_exclusion = 'on'; SELECT explain_filter('EXPLAIN (VERBOSE, COSTS FALSE) SELECT * FROM agg_csv WHERE a < 0'); Result Output: a, b + Replaces: Scan on agg_csv One-Time Filter: false \t off diff --git a/contrib/pg_overexplain/expected/pg_overexplain.out b/contrib/pg_overexplain/expected/pg_overexplain.out index 6de02323d7c..55d34666d87 100644 --- a/contrib/pg_overexplain/expected/pg_overexplain.out +++ b/contrib/pg_overexplain/expected/pg_overexplain.out @@ -44,9 +44,10 @@ EXPLAIN (RANGE_TABLE) SELECT 1; QUERY PLAN ------------------------------------------ Result (cost=0.00..0.01 rows=1 width=4) + RTIs: 1 RTI 1 (result): Eref: "*RESULT*" () -(3 rows) +(4 rows) -- Create a partitioned table. CREATE TABLE vegetables (id serial, name text, genus text) @@ -475,6 +476,7 @@ INSERT INTO vegetables (name, genus) VALUES ('broccoflower', 'brassica'); Nominal RTI: 1 Exclude Relation RTI: 0 -> Result + RTIs: 2 RTI 1 (relation): Eref: vegetables (id, name, genus) Relation: vegetables @@ -485,5 +487,5 @@ INSERT INTO vegetables (name, genus) VALUES ('broccoflower', 'brassica'); Eref: "*RESULT*" () Unprunable RTIs: 1 Result RTIs: 1 -(14 rows) +(15 rows) diff --git a/contrib/pg_overexplain/pg_overexplain.c b/contrib/pg_overexplain/pg_overexplain.c index de824566f8c..bd70b6d9d5e 100644 --- a/contrib/pg_overexplain/pg_overexplain.c +++ b/contrib/pg_overexplain/pg_overexplain.c @@ -236,6 +236,18 @@ overexplain_per_node_hook(PlanState *planstate, List *ancestors, ((MergeAppend *) plan)->apprelids, es); break; + case T_Result: + + /* + * 'relids' is only meaningful when plan->lefttree is NULL, + * but if somehow it ends up set when plan->lefttree is not + * NULL, print it anyway. + */ + if (plan->lefttree == NULL || + ((Result *) plan)->relids != NULL) + overexplain_bitmapset("RTIs", + ((Result *) plan)->relids, + es); default: break; } diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index cb74c87d1aa..6dc04e916dc 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -7159,8 +7159,9 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 < 0; Aggregate Output: count(*) -> Result + Replaces: Scan on ft1 One-Time Filter: false -(4 rows) +(5 rows) SELECT count(*) FROM ft1 WHERE c2 < 0; count @@ -7203,8 +7204,9 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT count(*) FROM ft1 WHERE c2 >= 0; Aggregate Output: count(*) -> Result + Replaces: Scan on ft1 One-Time Filter: false -(4 rows) +(5 rows) SELECT count(*) FROM ft1 WHERE c2 >= 0; count @@ -8032,8 +8034,9 @@ DELETE FROM rem1 WHERE false; -- currently can't be pushed down Remote SQL: DELETE FROM public.loc1 WHERE ctid = $1 -> Result Output: ctid + Replaces: Scan on rem1 One-Time Filter: false -(5 rows) +(6 rows) -- Test with statement-level triggers CREATE TRIGGER trig_stmt_before |