Re: [HACKERS] Bug in information_schema: FK constraint is defined as against referenced table only

2008-12-14 Thread Tom Lane
Josh Berkus writes: > By information_schema, you wouldn't have any idea that errors_file_fkey > is defined on the table Errors, let alone what columns it's defined > against. Look into key_column_usage. > I'm happy to write some code to fix it, if we can agree what these views > should show.

[HACKERS] Bug in information_schema: FK constraint is defined as against referenced table only

2008-12-14 Thread Josh Berkus
Folks, I've been trying to extract some information about referencing tables from information_schema, and discovering that it isn't there. For example, take the following FK, from table Errors to table Files: CONSTRAINT errors_file_fkey FOREIGN KEY (file) REFERENCES files (id) MATCH S