Fix errors in key_column_usage.position_in_unique_constraint column recently
authorTom Lane <[email protected]>
Fri, 10 Nov 2006 18:10:10 +0000 (18:10 +0000)
committerTom Lane <[email protected]>
Fri, 10 Nov 2006 18:10:10 +0000 (18:10 +0000)
commit8f5cb59cddd6ce85a3678c35b9e65eb8212ba417
treeb4ee0cc8434fc5235fc2a301a89593e66657faa2
parent04c915db8454bc7da3c79e3c4973abc68216a06f
Fix errors in key_column_usage.position_in_unique_constraint column recently
added to information_schema (per a SQL2003 addition).  The original coding
failed if a referenced column participated in more than one pg_constraint
entry.  Also, it did not work if an FK relied directly on a unique index
without any constraint syntactic sugar --- this case is outside the SQL spec,
but PG has always supported it, so it's reasonable for our information_schema
to handle it too.  Per bug#2750 from Stephen Haberman.

Although this patch changes the initial catalog contents, I didn't force
initdb.  Any beta3 testers who need the fix can install it via CREATE OR
REPLACE VIEW, so forcing them to initdb seems an unnecessary imposition.
src/backend/catalog/information_schema.sql