pgsql: psql \d: Display table where trigger is defined, if inherited

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: psql \d: Display table where trigger is defined, if inherited
Date: 2020-04-21 22:38:15
Message-ID: E1jR1Wx-0001Q7-61@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

psql \d: Display table where trigger is defined, if inherited

It's important to know that a trigger is cloned from a parent table,
because of the behavior that the trigger is dropped on detach. Make
psql's \d display it.

We'd like to backpatch, but lack of the pg_trigger.tgparentid column
makes it more difficult. Punt for now. If somebody wants to volunteer
an implementation that reads pg_depend on older versions, that can
probably be backpatched.

Authors: Justin Pryzby, Amit Langote, Álvaro Herrera
Discussion: https://postgr.es/m/20200419002206.GM26953@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c33869cc3bfc42bce822251f2fa1a2a346f86cc5

Modified Files
--------------
src/bin/psql/describe.c | 18 ++++++++++++++++--
src/test/regress/expected/triggers.out | 2 +-
2 files changed, 17 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-04-21 23:09:01 pgsql: Fix single-record reads to use restore_command if available in p
Previous Message Michael Paquier 2020-04-21 22:28:45 pgsql: Fix memory leak in libpq when using sslmode=verify-full