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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug in information_schema: FK constraint is defined as against referenced table only
Date: 2008-12-15 01:02:29
Message-ID: 5130.1229302949@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-12-15 02:41:38 Re: Sync Rep: First Thoughts on Code
Previous Message KaiGai Kohei 2008-12-15 01:00:03 Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)