Re: Bug in information_schema: FK constraint is defined as against referenced table only - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug in information_schema: FK constraint is defined as against referenced table only
Date
Msg-id 5130.1229302949@sss.pgh.pa.us
Whole thread Raw
In response to Bug in information_schema: FK constraint is defined as against referenced table only  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> 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.  I think constraint_column_usage and constraint_table_usage 
> should be showing the data of both the referenced and referencing tables.

You might think that, but the specification is 100% clear that you're
wrong.
        regards, tom lane


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Next
From: "Robert Haas"
Date:
Subject: Re: Sync Rep: First Thoughts on Code