Re: unique across two tables - Mailing list pgsql-general

From Tarlika Elisabeth Schmitz
Subject Re: unique across two tables
Date
Msg-id 20110620192602.583b7b5c@dick.coachhouse
Whole thread Raw
In response to Re: unique across two tables  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
List pgsql-general
On Mon, 20 Jun 2011 19:42:20 +0200
Alban Hertroys <dalroi@solfertje.student.utwente.nl> wrote:

>On 20 Jun 2011, at 17:03, Tarlika Elisabeth Schmitz wrote:
>
>> I have two tables, town and townalias, the latter containing
>> alternative town names.
>> I would like to ensure that a town name is unique per
>> country-region across the two tables.
>>
>> Can I do this with a constraint ot do I need to implement the logic
>> via trigger?
>
>
>This is very similar to what was recently discussed in the topic
>"Constraint to ensure value does NOT exist in another table?" in this
>list.

Thanks - found it:
http://postgresql.1045698.n5.nabble.com/Constraint-to-ensure-value-does-NOT-exist-in-another-table-td4493651.html


--

Best Regards,
Tarlika Elisabeth Schmitz

pgsql-general by date:

Previous
From: hyelluas
Date:
Subject: Re: how to find a tablespace for the table?
Next
From: Raghavendra
Date:
Subject: Re: how to find a tablespace for the table?