Re: partition tree inspection functions - Mailing list pgsql-hackers

From Robert Haas
Subject Re: partition tree inspection functions
Date
Msg-id CA+TgmoaO04FBSVG50h_ktJzCjM3Qhf6vgdEgs=igVXykDvK1sQ@mail.gmail.com
Whole thread Raw
In response to Re: partition tree inspection functions  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Responses Re: partition tree inspection functions
List pgsql-hackers
On Fri, Aug 3, 2018 at 8:35 AM, Jesper Pedersen
<jesper.pedersen@redhat.com> wrote:
> If you are given a leaf partition as input, then you will have to keep
> executing the query until you find the root, and count those. So, I think it
> should be either be the level to the root, or there should be another column
> that lists that (rootlevel).

I disagree.  I think Amit has got the right semantics -- it gives you
everything rooted at the partition you name, relative to that root.
We could have another function which, given the OID of a partition,
returns the topmost parent (or the immediate parent), but I think that
if you say "tell me all the partitions of X", it should just tell you
about stuff that's under X, regardless of what's over X.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Alexander Kukushkin
Date:
Subject: Re: Standby trying "restore_command" before local WAL
Next
From: Robert Haas
Date:
Subject: Re: Alter index rename concurrently to