Re: check constraint on insert but not delete

From: Vick Khera <vivek(at)khera(dot)org>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: check constraint on insert but not delete
Date: 2010-11-04 15:43:01
Message-ID: AANLkTimVg=QbAJnHLjce3nSLmgNk7pzz7YCCts8jd5d3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 4, 2010 at 11:03 AM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com> wrote:
> Is there a way to require that a check constraint be checked on insert but
> not update?    Worth knowing is that my check constraint runs a PLPgsql proc
> which returns a yes/no kinf of flag which the constraint proper checks.

Use an explicit ON INSERT trigger that calls your procedure instead of
a check constraint.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2010-11-04 15:44:38 Re: Linux
Previous Message Mathieu De Zutter 2010-11-04 15:34:35 Re: PHP Web Auditing and Authorization