Re: check

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Matt <matthew(dot)berardi(at)weilpublishing(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: check
Date: 2002-06-17 14:55:23
Message-ID: 20020617075412.A49868-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 14 Jun 2002, Matt wrote:

> how would you go about enforcing the default value:
>
> I have a nextval('seq') as my default and on an insert I don't want any
> other value to be allowed.

Don't do a default, do a before trigger that sets the value so that even
if a value is specified it uses the sequence anyway (or you could
potentially check that it's currently null and error I guess as well).

In response to

  • check at 2002-06-14 18:47:32 from Matt

Browse pgsql-sql by date

  From Date Subject
Next Message Manfred Koizar 2002-06-17 16:35:05 Re: check
Previous Message Christopher Kings-Lynne 2002-06-17 14:40:13 Re: check