Re: Interval & check clause - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Interval & check clause
Date
Msg-id 20040329154051.GA5202@wolff.to
Whole thread Raw
In response to Interval & check clause  ("Bruno BAGUETTE" <pgsql-ml@baguette.net>)
Responses Interval constant syntax, was Re: Interval & check clause
List pgsql-general
On Mon, Mar 29, 2004 at 14:30:14 +0200,
  Bruno BAGUETTE <pgsql-ml@baguette.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)

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: SQL extension
Next
From: "Uwe C. Schroeder"
Date:
Subject: Re: PG vs MySQL