Re: check constraint
От | erwan ancel |
---|---|
Тема | Re: check constraint |
Дата | |
Msg-id | 1054562442.6379.12.camel@brisedorient обсуждение исходный текст |
Ответ на | Re: check constraint (Bruno Wolff III <bruno@wolff.to>) |
Ответы |
Re: check constraint
Re: check constraint |
Список | pgsql-general |
well, no... these are not direct foreign keys. The constraint here is that for a given record of D, B pointed by A pointed by the given D must be the same as B pointed by C pointed by the given D. This is not a foreign key, or foreign keys are much more than what I thought. Erwan Le lun 02/06/2003 à 15:08, Bruno Wolff III a écrit : > On Mon, Jun 02, 2003 at 10:52:00 +0200, > erwan ancel <erwan.ancel@free.fr> wrote: > > Hi, > > I would like to know if it is possible to set "complex" constraints on > > databases such as: > > > > A->B means that in table A, each record references a record of table B > > (or NULL) > > > > so we have: > > > > A->B > > C->B > > D->C > > D->A > > constraint: for one record of D, D->A->B = D->C->B > > > > Hope it is clear enough. > > It looks like you are talking about foreign keys. Postgres has foreign key > constraints. You can look at the create table documentation to see how > to define them when creating a table. > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >
В списке pgsql-general по дате отправления: