On Tue, Oct 2, 2018 at 11:37 PM Michael Paquier <mich...@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