mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Make pg_partition_tree return no rows on unsupported and undefined objects
The function was tweaked so as it returned one row full of NULLs when
working on an unsupported relkind or an undefined object as of cc53123
,
and after discussion with Amit and Álvaro it looks more natural to make
it return no rows.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Amit Langote
Discussion: https://postgr.es/m/20190227184808.GA17357@alvherre.pgsql
This commit is contained in:
@ -9,8 +9,7 @@ SELECT * FROM pg_partition_tree(NULL);
|
||||
SELECT * FROM pg_partition_tree(0);
|
||||
relid | parentrelid | isleaf | level
|
||||
-------+-------------+--------+-------
|
||||
| | |
|
||||
(1 row)
|
||||
(0 rows)
|
||||
|
||||
SELECT pg_partition_root(NULL);
|
||||
pg_partition_root
|
||||
@ -163,14 +162,12 @@ CREATE MATERIALIZED VIEW ptif_test_matview AS SELECT 1;
|
||||
SELECT * FROM pg_partition_tree('ptif_test_view');
|
||||
relid | parentrelid | isleaf | level
|
||||
-------+-------------+--------+-------
|
||||
| | |
|
||||
(1 row)
|
||||
(0 rows)
|
||||
|
||||
SELECT * FROM pg_partition_tree('ptif_test_matview');
|
||||
relid | parentrelid | isleaf | level
|
||||
-------+-------------+--------+-------
|
||||
| | |
|
||||
(1 row)
|
||||
(0 rows)
|
||||
|
||||
SELECT pg_partition_root('ptif_test_view');
|
||||
pg_partition_root
|
||||
|
Reference in New Issue
Block a user