pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWrong date inserts
4+ messages / 3 participants
[nested] [flat]
* Wrong date inserts
@ 2002-04-14 11:26 Egon Reetz <reetz@usco.de>
0 siblings, 2 replies; 4+ messages in thread
From: Egon Reetz @ 2002-04-14 11:26 UTC (permalink / raw)
To: pgsql-admin
Hello,
database is 7.1.3, compiled with -enable-local -enable-recode
-enable-multibyte=UNICODE,
initdb -E UNICODE, createdb -E LATIN1.
I have a table with 2 date fields (start_date, end_date).
When I do: insert into my_table values ('12.04.2002', '31.08.2002');
I'm getting with select * from my_table:
2002-12-04 | 2002-08-31
It looks like day and month are exchanged, when the day is less or equal
12. Is this a known behavior? Anyone has an experiance like this with
7.2.1?
Thanks
Egon
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Wrong date inserts
@ 2002-04-14 17:06 Tom Lane <tgl@sss.pgh.pa.us>
parent: Egon Reetz <reetz@usco.de>
1 sibling, 1 reply; 4+ messages in thread
From: Tom Lane @ 2002-04-14 17:06 UTC (permalink / raw)
To: Egon Reetz <reetz@usco.de>; +Cc: pgsql-admin
Egon Reetz <reetz@usco.de> writes:
> It looks like day and month are exchanged, when the day is less or equal
> 12.
Sounds like you should change DateStyle to tell the truth about the date
format you are using. The system has to rely on that when the field
values don't make it obvious which component is which.
Looks like you want 'German' datestyle for this input.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Wrong date inserts
@ 2002-04-14 18:04 Egon Reetz <reetz@usco.de>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Egon Reetz @ 2002-04-14 18:04 UTC (permalink / raw)
To: pgsql-admin
Well, will look forward to find something about DateStyle, but
shouldn't both dates handled equally.
Same input format should result into the same result, shouldn't it?
Regards
Egon
Am Sonntag den, 14. April 2002, um 19:06, schrieb Tom Lane:
> Egon Reetz <reetz@usco.de> writes:
>> It looks like day and month are exchanged, when the day is less or
>> equal
>> 12.
>
> Sounds like you should change DateStyle to tell the truth about the date
> format you are using. The system has to rely on that when the field
> values don't make it obvious which component is which.
>
> Looks like you want 'German' datestyle for this input.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Wrong date inserts
@ 2002-04-14 21:38 Serguei Mokhov <sa_mokho@alcor.concordia.ca>
parent: Egon Reetz <reetz@usco.de>
1 sibling, 0 replies; 4+ messages in thread
From: Serguei Mokhov @ 2002-04-14 21:38 UTC (permalink / raw)
To: Egon Reetz <reetz@usco.de>; pgsql-admin
----- Original Message -----
From: "Egon Reetz" <reetz@usco.de>
Sent: Sunday, April 14, 2002 7:26 AM
> database is 7.1.3, compiled with -enable-local -enable-recode
^^^^^^^^^^^^^
Is it possible that this was just a spelling mistake?
--enable-locale
-s
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-04-14 21:38 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-04-14 11:26 Wrong date inserts Egon Reetz <reetz@usco.de>
2002-04-14 17:06 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-04-14 18:04 ` Egon Reetz <reetz@usco.de>
2002-04-14 21:38 ` Serguei Mokhov <sa_mokho@alcor.concordia.ca>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox