Re: partition tree inspection functions - Mailing list pgsql-hackers

From Robert Haas
Subject Re: partition tree inspection functions
Date
Msg-id CA+TgmoaKV=ECMDhDHfLSrZ08AueWu9w0k_3es6Aqsu2_funVog@mail.gmail.com
Whole thread Raw
In response to Re: partition tree inspection functions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: partition tree inspection functions
List 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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: constraints names on partitions
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel