diff options
| author | Tom Lane | 2009-10-14 22:14:25 +0000 |
|---|---|---|
| committer | Tom Lane | 2009-10-14 22:14:25 +0000 |
| commit | b2734a0d792df710aeeab21242cfa21ab470c773 (patch) | |
| tree | fea1d5961054f413f63995339f1aa6037d825b9e /src/bin | |
| parent | be922e8555a87263973a038c54171f2db833810d (diff) | |
Support SQL-compliant triggers on columns, ie fire only if certain columns
are named in the UPDATE's SET list.
Note: the schema of pg_trigger has not actually changed; we've just started
to use a column that was there all along. catversion bumped anyway so that
this commit is included in the history of potentially interesting changes
to system catalog contents.
Itagaki Takahiro
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/pg_dump/pg_dump.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index b0dfba9d6dc..e25bf7ab0b9 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.551 2009/10/12 23:41:43 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.552 2009/10/14 22:14:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4419,6 +4419,18 @@ getTriggers(TableInfo tblinfo[], int numTables) if (i_tgdef >= 0) { tginfo[j].tgdef = strdup(PQgetvalue(res, j, i_tgdef)); + + /* remaining fields are not valid if we have tgdef */ + tginfo[j].tgfname = NULL; + tginfo[j].tgtype = 0; + tginfo[j].tgnargs = 0; + tginfo[j].tgargs = NULL; + tginfo[j].tgisconstraint = false; + tginfo[j].tgdeferrable = false; + tginfo[j].tginitdeferred = false; + tginfo[j].tgconstrname = NULL; + tginfo[j].tgconstrrelid = InvalidOid; + tginfo[j].tgconstrrelname = NULL; } else { |
