Re: Multitable uniqueness ? - Mailing list pgsql-sql

From Andreas
Subject Re: Multitable uniqueness ?
Date
Msg-id 40B5974D.9000008@gmx.net
Whole thread Raw
In response to Re: Multitable uniqueness ?  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-sql
Bruno Wolff III wrote:

>On Wed, May 26, 2004 at 05:13:14 +0200,
>  Andreas <maps.on@gmx.net> wrote:
>  
>
>>Is there a way to have something like this :  UNIQUE (table_1.id, 
>>table_2.xxx)
>>    
>>
>
>Postgres doesn't support database constraints at this time which is
>what you would need to do this simply.
>  
>

Well, a simple way was to have a   table_1-foreign key  in the table 2.
I just thought since there is:

table_1  <--1:n--  table_x  <--1:n-- table_2

and I hoped not having to add
table_1  <--1:n-- table_2
just to have uniquness of an attribute of table_2 and the key of table_1

>You can enforce this constraint by creating a third table
>
That is more efford than to stuff the column into table_2.


Thanks anyway   ;)



pgsql-sql by date:

Previous
From: Andreas
Date:
Subject: Re: Multitable uniqueness ?
Next
From: Jean-Luc Lachance
Date:
Subject: Re: Multitable uniqueness ?