summaryrefslogtreecommitdiff
path: root/src/backend/catalog/partition.c
diff options
context:
space:
mode:
authorPeter Eisentraut2023-12-21 10:42:12 +0000
committerPeter Eisentraut2023-12-21 10:42:12 +0000
commite557db106ef69413edb75c362191084ee73a0f55 (patch)
treeb6ca3c5ace2eba3ab2addd230195d250bb547ef4 /src/backend/catalog/partition.c
parent9ca6e7b9411e36488ef539a2c1f6846ac92a7072 (diff)
Fix prologue of get_partition_ancestors()
The callers of this function assume that the first Oid in the list returned by this function corresponds to the immediate parent and the last on corresponds to the topmost parent. Make that explicit in the function prologue. Author: Ashutosh Bapat <[email protected]> Discussion: https://www.postgresql.org/message-id/CAExHW5vCbATEmht861=G-BFPHNwLUqyeGa_=8-xibJ6Q1UxAeA@mail.gmail.com
Diffstat (limited to 'src/backend/catalog/partition.c')
-rw-r--r--src/backend/catalog/partition.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c
index f8780ce57da..5b72dbd24a0 100644
--- a/src/backend/catalog/partition.c
+++ b/src/backend/catalog/partition.c
@@ -123,7 +123,9 @@ get_partition_parent_worker(Relation inhRel, Oid relid, bool *detach_pending)
* get_partition_ancestors
* Obtain ancestors of given relation
*
- * Returns a list of ancestors of the given relation.
+ * Returns a list of ancestors of the given relation. The list is ordered:
+ * The first element is the immediate parent and the last one is the topmost
+ * parent in the partition hierarchy.
*
* Note: Because this function assumes that the relation whose OID is passed
* as an argument and each ancestor will have precisely one parent, it should