Re: unexpected check constraint violation

From: ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To: Jacek Becla <becla(at)slac(dot)stanford(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: unexpected check constraint violation
Date: 2009-03-23 20:49:13
Message-ID: 42636588-3C77-4550-B7FD-3FD2C2DB69AB@rvt.dds.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 23, 2009, at 2:54 PM, Jacek Becla wrote:

> Hi,
>
> Can someone explain why postgres complains in this case:
>
> create table t(d real, check(d>=0.00603));
> insert into t values (0.00603);
>
> ERROR: new row for relation "t" violates check constraint "t_d_check"
>
> thanks
> Jacek

try this:

insert into t values (0.00603::real);

Ries

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jacek Becla 2009-03-23 20:52:50 Re: unexpected check constraint violation
Previous Message Christophe 2009-03-23 20:44:08 Re: unexpected check constraint violation