Re: Interval & check clause

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Bruno BAGUETTE <pgsql-ml(at)baguette(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Interval & check clause
Date: 2004-03-29 15:40:51
Message-ID: 20040329154051.GA5202@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 29, 2004 at 14:30:14 +0200,
Bruno BAGUETTE <pgsql-ml(at)baguette(dot)net> wrote:
> Hello,
>
> It may be a stupid question, but I'm looking to set a check clause in order
> to be sure that a INTERVAL field is 00:00:00 or higher, but NOT negatives
> values.
>
> How can I set that ?

check (col_name >= '0 day'::interval)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Uwe C. Schroeder 2004-03-29 16:09:49 Re: PG vs MySQL
Previous Message Richard Huxton 2004-03-29 15:08:14 Re: SQL extension