Re: partition tree inspection functions
От | Jesper Pedersen |
---|---|
Тема | Re: partition tree inspection functions |
Дата | |
Msg-id | 7f2e6674-9196-9fe7-1405-368bafd64198@redhat.com обсуждение исходный текст |
Ответ на | Re: partition tree inspection functions (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
Ответы |
Re: partition tree inspection functions
Re: partition tree inspection functions |
Список | pgsql-hackers |
Hi Amit, On 08/03/2018 04:28 AM, Amit Langote wrote: > That's a good idea, thanks. > > Actually, by the time I sent the last version of the patch or maybe few > versions before that, I too had started thinking if we shouldn't just have > a SETOF RECORD function like you've outlined here, but wasn't sure of the > fields it should have. (relid, parentid, level) seems like a good start, > or maybe that's just what we need. > I think there should be a column that identifies leaf partitions (bool isleaf), otherwise it isn't obvious in complex scenarios. > > Note that the level that's returned for each table is computed wrt the > root table passed to the function and not the actual root partition. > 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). Best regards, Jesper
В списке pgsql-hackers по дате отправления: