Re: Check Constraints and pg_dump

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Curt Sampson <cjs(at)cynic(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Check Constraints and pg_dump
Date: 2004-03-02 17:09:21
Message-ID: 20040302170921.GB27448@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 02, 2004 at 09:45:03 -0500,
Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> wrote:
>
> Wouldn't a FK on both tables be the appropriate schema? With the FK on
> contract being deffered?

No, since he only cares that there is at least one plan for a contract,
not a particular plan. You can do something like this as a hack where
when the plan referenced by the contract gets deleted that the contract
has to be changed to reference another plan or be deleted. But I think
using triggers is a better way to do this.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Edgar Mares 2004-03-02 17:14:42 grants
Previous Message Stephan Szabo 2004-03-02 16:56:56 Re: [PATCHES] Foreign key type checking patch