Re: psql display of foreign keys
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-04T19:41:00Z
Lists: pgsql-hackers
Attachments
- v5-0001-fix-psql-display-of-FKs.patch (text/x-diff)
On 2019-Feb-28, Michael Paquier wrote:
> On Wed, Feb 27, 2019 at 03:37:23PM -0300, Alvaro Herrera wrote:
> > +pg_partition_ancestors(PG_FUNCTION_ARGS)
> > +{
> > + Oid relid = PG_GETARG_OID(0);
> > + FuncCallContext *funcctx;
> > + ListCell **next;
> > +
> > + if (!check_rel_can_be_partition(relid))
> > + PG_RETURN_NULL();
>
> Not returning an empty set here? ;)
Yeah, I adapted to what was there then, but in the original coding I had
the SRF_RETURN_DONE that you committed for pg_partition_tree.
> I would have added tests with pg_partition_ancestors(NULL) and
> pg_partition_ancestors(0) for consistency with the rest.
Done.
> Except that and the ancestor tracking for inheritance, the shape of
> the patch looks good to me.
Thanks for reviewing! I have pushed with your proposed changes.
Here's the patch I'm really interested about :-)
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Improve psql's \d display of foreign key constraints
- 1af25ca0c2d9 12.0 landed
-
pg_partition_ancestors
- b96f6b19487f 12.0 landed