From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: partition tree inspection functions |
Date: | 2018-06-29 05:30:22 |
Message-ID: | CAFiTN-sUhhKTy+pvYmxOUanCkypqs=Hd1UE6Ow=FZPbzy4sdBQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 26, 2018 at 10:38 AM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Hi.
>
> As discussed a little while back [1] and also recently mentioned [2], here
> is a patch that adds a set of functions to inspect the details of a
> partition tree. There are three functions:
>
> pg_partition_parent(regclass) returns regclass
> pg_partition_root_parent(regclass) returns regclass
> pg_partition_tree_tables(regclass) returns setof regclass
>
>
> select p as relname,
> pg_partition_parent(p) as parent,
> pg_partition_root_parent(p) as root_parent
> from pg_partition_tree_tables('p') p;
> relname | parent | root_parent
> ---------+--------+-------------
> p | | p
> p0 | p | p
> p1 | p | p
> p00 | p0 | p
> p01 | p0 | p
> p10 | p1 | p
> p11 | p1 | p
> (7 rows)
>
Is it a good idea to provide a function or an option which can provide
partitions detail in hierarchical order?
i.e
relname level
p 0
p0 1
p00 2
p01 2
p1 1
....
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey V. Lepikhov | 2018-06-29 05:34:37 | Re: [WIP] [B-Tree] Retail IndexTuple deletion |
Previous Message | Kuntal Ghosh | 2018-06-29 05:00:08 | Re: [WIP] [B-Tree] Retail IndexTuple deletion |