Re: Multitable uniqueness ?
| От | Andreas |
|---|---|
| Тема | Re: Multitable uniqueness ? |
| Дата | |
| Msg-id | 40B5974D.9000008@gmx.net обсуждение исходный текст |
| Ответ на | Re: Multitable uniqueness ? (Bruno Wolff III <bruno@wolff.to>) |
| Список | 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 по дате отправления: