Subject: Bug in SQLForeignKeys()
authorBruce Momjian <[email protected]>
Tue, 23 Jan 2001 20:36:30 +0000 (20:36 +0000)
committerBruce Momjian <[email protected]>
Tue, 23 Jan 2001 20:36:30 +0000 (20:36 +0000)
commit0da11f59b2f2664b1212ae2bcdd4cd31ec50a0e3
tree606db631d093f677d278d9f517b01843ce4161fe
parent741cf5ec1c744ae81b8ae245e12c35a9cb57764c
Subject: Bug in SQLForeignKeys()

Query used for checking foreign key triggers
returns too many results when there're more than one foreign
key in a table. It happens because only table's oid is used to
link between pg_trigger with INSERT check and pg_trigger with
UPDATE/DELETE check.

I think there should be enough to add following conditions
into WHERE clause of that query:
        AND     pt.tgconstrname = pg_trigger.tgconstrname
        AND     pt.tgconstrname = pg_trigger_1.tgconstrname

/Constantin
info.c
pgtypes.c