Re: check constraint

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: erwan ancel <erwan(dot)ancel(at)free(dot)fr>
Cc: PostgreSQL-general <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: check constraint
Date: 2003-06-02 13:08:19
Message-ID: 20030602130819.GA15591@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 02, 2003 at 10:52:00 +0200,
erwan ancel <erwan(dot)ancel(at)free(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Eckermann 2003-06-02 13:34:42 Re: ERROR: CreateTrigger: function.....
Previous Message btober 2003-06-02 12:31:02 Re: URGENT: how to restore corrupted pg?