summaryrefslogtreecommitdiff
path: root/src/include/catalog
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-02-08 08:56:14 +0900
committerMichael Paquier <michael@paquier.xyz>2019-02-08 08:56:14 +0900
commit3677a0b26bb2f3f72d16dc7fa6f34c305badacce (patch)
treea46ee2b807265d8f0c899c53f1bad3bebec67b34 /src/include/catalog
parent34ea1ab7fd305afe1124a6e73ada0ebae04b6ebb (diff)
downloadpostgresql-3677a0b26bb2f3f72d16dc7fa6f34c305badacce.tar.gz
Add pg_partition_root to display top-most parent of a partition tree
This is useful when looking at partition trees with multiple layers, and combined with pg_partition_tree, it provides the possibility to show up an entire tree by just knowing one member at any level. Author: Michael Paquier Reviewed-by: Álvaro Herrera, Amit Langote Discussion: https://postgr.es/m/20181207014015.GP2407@paquier.xyz
Diffstat (limited to 'src/include/catalog')
-rw-r--r--src/include/catalog/catversion.h2
-rw-r--r--src/include/catalog/pg_proc.dat5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index df50566877..5eb4f6f172 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 201902071
+#define CATALOG_VERSION_NO 201902081
#endif
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index b8de13f03b..93e3e16f01 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -10509,4 +10509,9 @@
proargnames => '{rootrelid,relid,parentrelid,isleaf,level}',
prosrc => 'pg_partition_tree' },
+# function to get the top-most partition root parent
+{ oid => '3424', descr => 'get top-most partition root parent',
+ proname => 'pg_partition_root', prorettype => 'regclass',
+ proargtypes => 'regclass', prosrc => 'pg_partition_root' },
+
]