Re: partition tree inspection functions
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Thomas Munro <thomas.munro@enterprisedb.com>, Jesper Pedersen <jesper.pedersen@redhat.com>,
Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-10-12T16:39:15Z
Lists: pgsql-hackers
On Tue, Oct 2, 2018 at 11:37 PM Michael Paquier <michael@paquier.xyz> wrote: > Putting the new function pg_partition_children() in partition.c is a > bad idea I think. So instead I think that we should put that in a > different location, say utils/adt/partitionfuncs.c. > > + TupleDescInitEntry(tupdesc, (AttrNumber) 1, "relid", > + REGCLASSOID, -1, 0); > + TupleDescInitEntry(tupdesc, (AttrNumber) 2, "parentid", > + REGCLASSOID, -1, 0); > REGCLASSOID is used mainly for casting, so instead let's use OIDOID like > any other system function. -1. REGCLASSOID is a lot easier for humans to read and can still be joined to an OID column somewhere if needed. I think we should be striving to use types like regclass more often in system catalogs and views, not less often. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Add pg_partition_tree to display information about partitions
- d5eec4eefde7 12.0 landed