Re: check constraint - Mailing list pgsql-general

From Patrick Welche
Subject Re: check constraint
Date
Msg-id 20030608200218.A18618@quartz.newn.cam.ac.uk
Whole thread Raw
In response to Re: check constraint  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: check constraint  (erwan ancel <erwan.ancel@free.fr>)
List pgsql-general
> >>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

Could inheritance be used?

   D -> A -> B
   D -> C -> B

suggests that A and C are similar. I have never tried using inheritance -
could you put the constraints on a table which both A and C inherit?

Cheers,

Patrick

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Temporary tables inside functions problem
Next
From: Sean Chittenden
Date:
Subject: Re: Estimate of when CVS will be available again?