From: | Eric Walstad <eric(at)ericwalstad(dot)com> |
---|---|
To: | |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: formatting a date when some nulls exist |
Date: | 2002-09-04 05:15:14 |
Message-ID: | 3D7596E2.3030707@ericwalstad.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Tom,
Thanks for your help. I'll send RH a note.
FWIW, I got around the problem by doing this:
SELECT EXTRACT(YEAR FROM birthday) || '-' || LPAD(EXTRACT(MONTH FROM
birthday), 2, '0') || '-' || LPAD(EXTRACT(DAY FROM birthday), 2, '0') AS
bday FROM ewtest;
Which is really ugly, but works for me for now.
Thanks again,
Eric.
Tom Lane wrote:
> Eric Walstad <eric(at)walstads(dot)net> writes:
>
>>[ewalstad(at)uluwatu ewalstad]$ uname -a
>>Linux uluwatu 2.4.18-10 #1 Wed Aug 7 11:39:21 EDT 2002 i686 unknown
>
>
> Ah, you're using the new-and-"improved" glibc. I'll bet you have dates
> in your table that precede 1/1/1970? The glibc boys decided (quite
> arbitrarily) that mktime(3) should stop supporting pre-1970 dates, and
> that in turn broke a number of Postgres operations.
>
> I just today committed a fix that works around this problem. It'll
> be in PG 7.3 if it survives beta testing. I'm afraid I don't have any
> very good answer for 7.2 ... but do complain to your Linux distributor
> that mktime() is broken. Because it is, and the glibc authors need to
> hear about it often enough to realize that they made a stupid decision.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Eric Walstad | 2002-09-04 05:16:36 | Re: formatting a date when some nulls exist |
Previous Message | Tom Lane | 2002-09-04 04:42:15 | Re: formatting a date when some nulls exist |