Re: partition tree inspection functions
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>, Thomas Munro <thomas.munro@enterprisedb.com>, Robert Haas <robertmhaas@gmail.com>, Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-10-30T01:33:18Z
Lists: pgsql-hackers
On Mon, Oct 29, 2018 at 04:08:09PM +0900, Amit Langote wrote: > Hmm, I think we mention the word "partitioned" in the error message only > if partitioning is required to perform an operation but it's absent (for > example, trying to attach partition to a non-partitioned table) or if its > presence prevents certain operation from being performed (for example, > calling pgrowlocks() on a partitioned table). Neither seems true in this > case. One can pass a relation of any of the types mentioned in the above > error message to pg_partition_tree and get some output from it. Okay.. We could always reword the error message if there are any complaints. > I've fixed the documentation to mention regclass as the input type. Also, > I've also modified tests to not use ::regclass. Thanks for the new version and using better index names. I have reviewed and committed the patch, with a couple of things tweaked: - removal of the tests on the size, they don't seem useful as part of showing partition information. - no need to join on pg_class for the test of the normal table. - added some comments and reformulated some other comments. - added a test with a materialized view. - added a test with a NULL input (as that's a strict function). -- Michael
Commits
-
Add pg_partition_tree to display information about partitions
- d5eec4eefde7 12.0 landed