aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2018-12-18 10:52:21 +0900
committerMichael Paquier <michael@paquier.xyz>2018-12-18 10:52:21 +0900
commit3e514c1238312c56b73d956d844c67a034dead02 (patch)
tree323e546f47a1f27d6cdbd131e7a9f3dad593477e
parented6f15eb35a95bc40ad6b05e99cbf495e034249b (diff)
downloadpostgresql-3e514c1238312c56b73d956d844c67a034dead02.tar.gz
postgresql-3e514c1238312c56b73d956d844c67a034dead02.zip
Tweak description comments in tests for partition functions
The new wording is more generic and fixes one grammar mistake and one typo on the way. Per discussion between Amit Langote and me. Discussion: https://postgr.es/m/20181217064028.GJ31474@paquier.xyz
-rw-r--r--src/test/regress/expected/partition_info.out8
-rw-r--r--src/test/regress/sql/partition_info.sql8
2 files changed, 10 insertions, 6 deletions
diff --git a/src/test/regress/expected/partition_info.out b/src/test/regress/expected/partition_info.out
index 202d8208279..3e15e02f8da 100644
--- a/src/test/regress/expected/partition_info.out
+++ b/src/test/regress/expected/partition_info.out
@@ -1,5 +1,5 @@
--
--- Tests for pg_partition_tree
+-- Tests for functions providing information about partitions
--
SELECT * FROM pg_partition_tree(NULL);
relid | parentrelid | isleaf | level
@@ -99,7 +99,7 @@ SELECT relid, parentrelid, level, isleaf
(1 row)
DROP TABLE ptif_test;
--- A table not part of a partition tree works is the only member listed.
+-- Table that is not part of any partition tree is the only member listed.
CREATE TABLE ptif_normal_table(a int);
SELECT relid, parentrelid, level, isleaf
FROM pg_partition_tree('ptif_normal_table');
@@ -109,7 +109,9 @@ SELECT relid, parentrelid, level, isleaf
(1 row)
DROP TABLE ptif_normal_table;
--- Views and materialized viewS cannot be part of a partition tree.
+-- Various partitioning-related functions return NULL if passed relations
+-- of types that cannot be part of a partition tree; for example, views,
+-- materialized views, etc.
CREATE VIEW ptif_test_view AS SELECT 1;
CREATE MATERIALIZED VIEW ptif_test_matview AS SELECT 1;
SELECT * FROM pg_partition_tree('ptif_test_view');
diff --git a/src/test/regress/sql/partition_info.sql b/src/test/regress/sql/partition_info.sql
index 9b55a7fe5ce..5d6e647146d 100644
--- a/src/test/regress/sql/partition_info.sql
+++ b/src/test/regress/sql/partition_info.sql
@@ -1,5 +1,5 @@
--
--- Tests for pg_partition_tree
+-- Tests for functions providing information about partitions
--
SELECT * FROM pg_partition_tree(NULL);
SELECT * FROM pg_partition_tree(0);
@@ -54,13 +54,15 @@ SELECT relid, parentrelid, level, isleaf
DROP TABLE ptif_test;
--- A table not part of a partition tree works is the only member listed.
+-- Table that is not part of any partition tree is the only member listed.
CREATE TABLE ptif_normal_table(a int);
SELECT relid, parentrelid, level, isleaf
FROM pg_partition_tree('ptif_normal_table');
DROP TABLE ptif_normal_table;
--- Views and materialized viewS cannot be part of a partition tree.
+-- Various partitioning-related functions return NULL if passed relations
+-- of types that cannot be part of a partition tree; for example, views,
+-- materialized views, etc.
CREATE VIEW ptif_test_view AS SELECT 1;
CREATE MATERIALIZED VIEW ptif_test_matview AS SELECT 1;
SELECT * FROM pg_partition_tree('ptif_test_view');