diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-02-08 08:56:14 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-02-08 08:56:14 +0900 |
commit | 3677a0b26bb2f3f72d16dc7fa6f34c305badacce (patch) | |
tree | a46ee2b807265d8f0c899c53f1bad3bebec67b34 /src/include/catalog | |
parent | 34ea1ab7fd305afe1124a6e73ada0ebae04b6ebb (diff) | |
download | postgresql-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.h | 2 | ||||
-rw-r--r-- | src/include/catalog/pg_proc.dat | 5 |
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' }, + ] |