Dates rejected - Mailing list pgsql-general

From Carlos H. Reimer
Subject Dates rejected
Date
Msg-id PEEPKDFEHHEMKBBFPOOKMELFDFAA.carlos.reimer@opendb.com.br
Whole thread Raw
Responses Re: Dates rejected
Re: Dates rejected
List pgsql-general
Hi,
 
We´ve a simple insert that is not working. The strange thing is that all kind of date are working with the exception of 15/10 (DD/MM) dates.
 
create table tt_teste (datfis timestamp without time zone not null
 CHECK (datfis = trunc(datfis::timestamp without time zone)));

INSERT INTO tt_teste (datfis)
VALUES (
to_date('15/10/2006','DD/MM/YYYY')
 );
ERROR:  new row for relation "tt_teste" violates check constraint "tt_teste_datfis_check"
I´ll appreciate any help!
 
Thanks in advance!

Carlos Reimer

 

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: ERROR: current transaction is aborted, commands ignored until end of transaction block
Next
From: Andreas Kretschmer
Date:
Subject: Re: Dates rejected