Lists: | pgsql-admin |
---|
From: | Egon Reetz <reetz(at)usco(dot)de> |
---|---|
To: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Wrong date inserts |
Date: | 2002-04-14 11:26:05 |
Message-ID: | 3CB9674D.5E1BB361@usco.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Egon Reetz <reetz(at)usco(dot)de> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Wrong date inserts |
Date: | 2002-04-14 17:06:38 |
Message-ID: | 22185.1018803998@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
Egon Reetz <reetz(at)usco(dot)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
From: | Egon Reetz <reetz(at)usco(dot)de> |
---|---|
To: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Wrong date inserts |
Date: | 2002-04-14 18:04:29 |
Message-ID: | 1069B596-4FD2-11D6-A7B8-0003936D343A@usco.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | 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(at)usco(dot)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
>
From: | "Serguei Mokhov" <sa_mokho(at)alcor(dot)concordia(dot)ca> |
---|---|
To: | "Egon Reetz" <reetz(at)usco(dot)de>, "pgsql-admin" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Wrong date inserts |
Date: | 2002-04-14 21:38:23 |
Message-ID: | 011801c1e3fc$b5782c20$bb6afea9@gunn |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
----- Original Message -----
From: "Egon Reetz" <reetz(at)usco(dot)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