Found this in 7.4.5, verified it's still in 8.0b4: test=> select * from information_schema.referential_constraints; test|public|$1|test|public|reftest1_pkey|NONE|NO ACTION|CASCADE test|public|$1|test|public|reftest1_pkey|NONE|NO ACTION|NO ACTION test|public|$1|test|public|reftest1_pkey|NONE|NO ACTION|NO ACTION
In that case there are three tables all referencing the same column of a fourth - but there is no way at all to tell which row corresponds to which table, and hence no way to join against, say, table_constraints. A similar issue may exist with the check_constraints view, which was the only other place I found where constraint_name is used without any table name being present. I don't know what the spec says, but it seems that something is assuming that constraint_name is unique within the schema, which of course is not the case in the above example. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html