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: 20040329154051.GA5202@wolff.to (view raw or flat)
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

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-2014 The PostgreSQL Global Development Group