[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Can a single postgres table foreign key reference a c
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Can a single postgres table foreign key reference a column in each of multiple different tables (in absence of inheritance)? |
Date: |
Sat, 8 Oct 2011 12:44:23 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Oct 07, 2011 at 08:21:59AM -0700, Jim Busser wrote:
> table
>
> dem.lnk_org_unit2comm column
>
> fk_org_unit
>
> is shown mapping to two foreign keys, as also seen if (in psql) doing
>
> \d+ dem.lnk_org_unit2comm
>
> which returns, among other things,
>
> Foreign-key constraints:
> "lnk_org_unit2comm_fk_org_unit_fkey" FOREIGN KEY (fk_org_unit)
> REFERENCES dem.org(pk) ON UPDATE CASCADE ON DELETE RESTRICT
> "lnk_org_unit2comm_fk_org_unit_fkey1" FOREIGN KEY (fk_org_unit)
> REFERENCES dem.org_unit(pk) ON UPDATE CASCADE ON DELETE RESTRICT
That's certainly a bug.
Fixed. Thanks for reporting !
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346