Re: unexpected check constraint violation

Поиск
Список
Период
Сортировка
От Jacek Becla
Тема Re: unexpected check constraint violation
Дата
Msg-id 49C7F6A2.8030605@SLAC.Stanford.EDU
обсуждение исходный текст
Ответ на Re: unexpected check constraint violation  (ries van Twisk <pg@rvt.dds.nl>)
Ответы Re: unexpected check constraint violation  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
Thanks Ries. Do you know if that is a postgres feature or a bug?

In practice, I wanted to load the data from a file using
COPY FROM. Modifying a large csv file in impractical and
not very elegant.

thanks,
Jacek



ries van Twisk wrote:
>
> 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 по дате отправления:

Предыдущее
От: RebeccaJ
Дата:
Сообщение: Re: text column constraint, newbie question
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: unexpected check constraint violation