Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc87f22

Browse files
committed
psql: show cloned triggers in partitions
In a partition, row triggers that had been cloned from their parentpartitioned table would not be listed at all in psql's \d, which couldsurprise users, per insistent complaint from Ashutosh Bapat (though hisaim was elsewhere). The simplest possible fix, suggested by PeterEisentraut, seems to be to list triggers marked as internal if they havea row in pg_depend that points to some other trigger.Author: Álvaro HerreraDiscussion:https://postgr.es/m/20180618165910.p26vhk7dpq65ix54@alvherre.pgsql
1 parent4137207 commitbc87f22

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/bin/psql/describe.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2713,7 +2713,11 @@ describeOneTableDetails(const char *schemaname,
27132713
pset.sversion >=80300 ?
27142714
"t.tgconstraint <> 0 AS tgisinternal" :
27152715
"false AS tgisinternal"),oid);
2716-
if (pset.sversion >=90000)
2716+
if (pset.sversion >=110000)
2717+
appendPQExpBuffer(&buf,"(NOT t.tgisinternal OR (t.tgisinternal AND t.tgenabled = 'D') \n"
2718+
" OR EXISTS (SELECT 1 FROM pg_catalog.pg_depend WHERE objid = t.oid \n"
2719+
" AND refclassid = 'pg_catalog.pg_trigger'::regclass))");
2720+
elseif (pset.sversion >=90000)
27172721
/* display/warn about disabled internal triggers */
27182722
appendPQExpBuffer(&buf,"(NOT t.tgisinternal OR (t.tgisinternal AND t.tgenabled = 'D'))");
27192723
elseif (pset.sversion >=80300)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp