Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group