Re: partition tree inspection functions
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: jesper.pedersen@redhat.com
Cc: Michael Paquier <michael@paquier.xyz>,
Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-30T09:21:54Z
Lists: pgsql-hackers
Attachments
Hi, On 2018/07/27 21:21, Jesper Pedersen wrote: > Hi Amit, > > On 07/26/2018 10:33 PM, Amit Langote wrote: >> Optional parameter sounds good, so made it get_partition_level(regclass [ >> , regclass ]) in the updated patch. Although, adding that argument is not >> without possible surprises its result might evoke. Like, what happens if >> you try to find the level of the root table by passing a leaf partition >> oid for the root table argument, or pass a totally unrelated table for the >> root table argument. For now, I've made the function return 0 for such >> cases. >> > > As 0 is a valid return value for root nodes I think we should use -1 > instead for these cases. Makes sense, changed to be that way. Thanks, Amit
Commits
-
Add pg_partition_tree to display information about partitions
- d5eec4eefde7 12.0 landed