Re: check constraint question - Mailing list pgsql-general

From David Johnston
Subject Re: check constraint question
Date
Msg-id 1396995677952-5799282.post@n5.nabble.com
Whole thread Raw
In response to Re: check constraint question  (CS_DBA <cs_dba@consistentstate.com>)
List pgsql-general
Based on your first question a customer id itself is not a valid designator;
you have to specify (or link) in the group as well.

Not tested but should work:

FOREIGN KEY (template, group) REFERENCES customer (cust_id, group)

Depends on whether you want to allow cross-group associations if you need a
separate group template id.

David J.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/check-constraint-question-tp5799252p5799282.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: CS_DBA
Date:
Subject: Re: check constraint question
Next
From: David Johnston
Date:
Subject: Re: create temp view from function inside plpgsql function.