Re: psql display of foreign keys
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Pg Hackers <pgsql-hackers@lists.postgresql.org>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Date: 2018-12-05T01:16:33Z
Lists: pgsql-hackers
On Tue, Dec 04, 2018 at 03:41:59PM -0300, Alvaro Herrera wrote: > I spent a few minutes trying to think of a way of determining which > query to use at SQL-execution time -- two CTEs, one of which would be > short-circuited ... but I couldn't figure out how. I also tried to use > the new pg_partition_tree() function, but it's useless for this purpose > because it roots at its argument table, and there doesn't seem to be a > convenient way to obtain the topmost ancestor. This has been mentioned on the thread where pg_partition_tree has been discussed: https://www.postgresql.org/message-id/6baeb45a-6222-6b88-342d-37fc7d3cf89a%40lab.ntt.co.jp It got shaved from the final patch for simplicity as we had enough issues to deal with first. Adding a pg_partition_root or a new column in pg_partition_tree makes sense. My guts are telling me that a separate function is more instinctive to use. -- Michael
Commits
-
Improve psql's \d display of foreign key constraints
- 1af25ca0c2d9 12.0 landed
-
pg_partition_ancestors
- b96f6b19487f 12.0 landed