From: | Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: partition tree inspection functions |
Date: | 2018-07-26 16:30:38 |
Message-ID: | 2780ebf9-99ae-b433-2d0c-dbca2995956a@redhat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Amit,
On 07/26/2018 04:47 AM, Amit Langote wrote:
> Alright, I have replaced pg_partition_tree_tables with
> pg_partition_children with an 'include_all' argument, as you suggested,
> but I implemented it as an optional argument. So, one would use that
> argument only if need to get *all* partitions. I have also added a
> pg_partition_leaf_children() that returns just the leaf partitions, which
> wasn't there in the previous versions.
>
Great.
> Further, I've added a pg_partition_level that returns the level of a
> partition in the partition tree wrt to the root of the *whole* partition
> tree. But maybe we want this function to accept one more argument,
> 'rootoid', the OID of the root table against which to measure the level?
>
I don't think that is needed, or it should at least be an optional
parameter.
>>> Maybe call it pg_partition_tree_leaf_count() or some such then?
>>
>> That could work.
>
> OK, I fixed it to return just the count of leaf partitions and renamed it
> as such (pg_partition_children_leaf_count), but wonder if it's been made
> redundant by the addition of pg_partition_leaf_children.
>
I think with pg_partition_leaf_children that we don't need the _count
method, called pg_partition_tree_leaf_count in the docs, as we can just
do a COUNT().
Best regards,
Jesper
From | Date | Subject | |
---|---|---|---|
Next Message | Cynthia Shang | 2018-07-26 16:45:09 | Re: Allow COPY's 'text' format to output a header |
Previous Message | Tom Lane | 2018-07-26 16:28:23 | Re: negative bitmapset member not allowed Error with partition pruning |