Skip site navigation (1) Skip section navigation (2)

Re: Multitable uniqueness ?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Multitable uniqueness ?
Date: 2004-05-27 07:22:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Bruno Wolff III wrote:

>On Wed, May 26, 2004 at 05:13:14 +0200,
>  Andreas <maps(dot)on(at)gmx(dot)net> wrote:
>>Is there a way to have something like this :  UNIQUE (, 
>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   ;)

In response to

pgsql-sql by date

Next:From: Willem de JongDate: 2004-05-27 11:14:58
Subject: Re: sum ( time) problem
Previous:From: AndreasDate: 2004-05-27 07:07:38
Subject: Re: Multitable uniqueness ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group