Re: [HACKERS] datetime ?#!!??@ - Mailing list pgsql-general

From Tom Lane
Subject Re: [HACKERS] datetime ?#!!??@
Date
Msg-id 4279.901203330@sss.pgh.pa.us
Whole thread Raw
In response to datetime ?#!!??@  (dlibenzi@maticad.it (Davide Libenzi))
Responses Re: [GENERAL] Re: [HACKERS] datetime ?#!!??@  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-general
dlibenzi@maticad.it (Davide Libenzi) writes:
> I've successfully ported PostgreSQL to HPUX 9.0.* but there is a strange
> behaviour with the datetime data type.
> mydb==> create table foo (ffoo datetime);
> mydb==> insert into foo values ('01/01/1998');
> mydb==> select ffoo from foo;
> The rusult is a totally wrong date with year 2140.

It works fine for me on HPUX 9.03:

play=> create table foo (ffoo datetime);
CREATE
play=> insert into foo values ('01/01/1998');
INSERT 105801 1
play=> select ffoo from foo;
ffoo
----------------------------
Thu Jan 01 00:00:00 1998 EST
(1 row)

Hmm, there are a bunch of uses of rint() in adt/dt.c.  I'll bet
your problem is that you're using the broken version of rint()
that's in HP's older releases of /lib/pa1.1/libm.a.  Have you
installed patch PHSS_4630?

You may care to consult my message "Porting notes and patches for HP-UX
9.* and 10.*" in the pgsql-patches archives for 21 Apr 1998.  This
stuff has been taken care of in the current development sources,
but if you are trying to use the 6.3.2 release you need to apply
the fixes yourself.

BTW, hackers, I intend to submit additional text for the INSTALL
directions document that warns people to get PHSS_4630 if they're
still on HPUX 9 ... if we can confirm that the primary symptom is
silly datetime results, that'll be a good thing to note in INSTALL.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Tong
Date:
Subject: Re: [INTERFACES] ODBC Driver
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Re: [HACKERS] datetime ?#!!??@