3 foreign keys in 1 table for 3 1-to-many relations? - Mailing list pgsql-sql

From gvim
Subject 3 foreign keys in 1 table for 3 1-to-many relations?
Date
Msg-id 5582161F.7070809@gmail.com
Whole thread Raw
Responses Re: 3 foreign keys in 1 table for 3 1-to-many relations?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
I have 3 tables A, B & C each of which has a 1-to-many relation with a 
Comments table but I can't fathom how to set up the foreign key(s) in 
Comments without resorting to distinct A_id, B_id & C_id columns in 
Comments and enforcing 2 of the 3 columns be NULL for a given row. Seems 
ugly.

gvim



pgsql-sql by date:

Previous
From: Stephen Tahmosh
Date:
Subject: Re: EnterpriseDB: PostgreSql 9.4 Where is the Language Pack Installer?
Next
From: "David G. Johnston"
Date:
Subject: Re: 3 foreign keys in 1 table for 3 1-to-many relations?