diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 4 | ||||
-rw-r--r-- | src/bin/psql/describe.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 6c9cb886b99..05fc7ad5a44 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.566 2010/01/06 05:18:18 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.567 2010/01/17 22:56:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4584,7 +4584,7 @@ getTriggers(TableInfo tblinfo[], int numTables) "tgenabled, tableoid, oid " "FROM pg_catalog.pg_trigger t " "WHERE tgrelid = '%u'::pg_catalog.oid " - "AND tgconstraint = 0", + "AND NOT tgisinternal", tbinfo->dobj.catId.oid); } else if (g_fout->remoteVersion >= 80300) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 4fdf8641744..dca1f577c03 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -8,7 +8,7 @@ * * Copyright (c) 2000-2010, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.233 2010/01/02 16:57:59 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.234 2010/01/17 22:56:23 tgl Exp $ */ #include "postgres_fe.h" @@ -1849,7 +1849,7 @@ describeOneTableDetails(const char *schemaname, PQclear(result); } - /* print triggers (but ignore RI and unique constraint triggers) */ + /* print triggers (but only user-defined triggers) */ if (tableinfo.hastriggers) { printfPQExpBuffer(&buf, @@ -1859,7 +1859,9 @@ describeOneTableDetails(const char *schemaname, "FROM pg_catalog.pg_trigger t\n" "WHERE t.tgrelid = '%s' AND ", oid); - if (pset.sversion >= 80300) + if (pset.sversion >= 80500) + appendPQExpBuffer(&buf, "NOT t.tgisinternal"); + else if (pset.sversion >= 80300) appendPQExpBuffer(&buf, "t.tgconstraint = 0"); else appendPQExpBuffer(&buf, |