pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: psql display of foreign keys
Date: Tue, 04 Dec 2018 10:00:00 -0500
Message-ID: <23923.1543935600@sss.pgh.pa.us> (raw)
In-Reply-To: <20181204143834.ym6euxxxi5aeqdpn@alvherre.pgsql>
References: <20181204143834.ym6euxxxi5aeqdpn@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> This is not very useful.  I propose that we change it so that it only
> displays the one on the partitioned table on which the constraint was
> defined:

OK goal, but ...

> Patch attached.

... this patch breaks the expectation set at the top of describe.c:

 * Support for the various \d ("describe") commands.  Note that the current
 * expectation is that all functions in this file will succeed when working
 * with servers of versions 7.4 and up.  It's okay to omit irrelevant
 * information for an old server, but not to fail outright.

Do you really need WITH RECURSIVE for this?  If so, I'd suggest
applying it only when relkind == RELKIND_PARTITIONED_TABLE, so
that the case doesn't happen in servers too old to have WITH.
That's probably a win performance-wise anyway, as I have no doubt
that the performance of this query is awful compared to what it
replaces, so we don't really want to use it if we don't have to.

			regards, tom lane




view thread (30+ messages)  latest in thread

Message-ID: <23923.1543935600@sss.pgh.pa.us>
Permalink:  ../23923.1543935600@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23923.1543935600@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: psql display of foreign keys
  In-Reply-To: <23923.1543935600@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox