Subject: Bug in SQLForeignKeys()

Bruce Momjian <bruce@momjian.us>

Commit: edfca4b98b44f336ca88b2adf4dfbe6b59d7b146
Author: Bruce Momjian <bruce@momjian.us>
Date: 2001-01-23T20:36:30Z
Releases: 7.1.1
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

Files

PathChange+/−
src/interfaces/odbc/info.c modified +3 −1
src/interfaces/odbc/pgtypes.c modified +3 −1