Re: unexpected check constraint violation - Mailing list pgsql-general

From ries van Twisk
Subject Re: unexpected check constraint violation
Date
Msg-id 42636588-3C77-4550-B7FD-3FD2C2DB69AB@rvt.dds.nl
Whole thread Raw
In response to unexpected check constraint violation  (Jacek Becla <becla@slac.stanford.edu>)
Responses Re: unexpected check constraint violation
List 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





pgsql-general by date:

Previous
From: Christophe
Date:
Subject: Re: unexpected check constraint violation
Next
From: Whit Armstrong
Date:
Subject: libpq -- reading a timestamp with time zone using binary format