datetime ?#!!??@

Started by Nonameover 27 years ago4 messages
#1Noname
dlibenzi@maticad.it

I've successfully ported PostgreSQL to HPUX 9.0.* but there is a strange
behaviour with the datetime data type.

If do do this sequence :

$ createdb mydb
[OK]

$ psqk mydb

mydb==> create table foo (ffoo datetime);
[OK]

mydb==> insert into foo values ('01/01/1998');
[OK]

mydb==> select ffoo from foo;

The rusult is a totally wrong date with year 2140.

I've tried to set datestyle but the results don't change.

Has anybody a hint for me ?

----
Davide Libenzi at :
Maticad s.r.l.
Via Della Giustizia n.9 Fano (PS) 61032 Italy
Tel.: +39-721-808308 (ra) Fax: +39-721-808309
Email: <davidel@maticad.it>
WWW: <http://www.maticad.it&gt;

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: [HACKERS] datetime ?#!!??@

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

#3Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Tom Lane (#2)
Re: [GENERAL] Re: [HACKERS] datetime ?#!!??@

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.

We need an HPUX-specific FAQ. Period. We have needed it for a long
time, between HPUX 9.* and 10.*, and those stars are significant.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)
#4Noname
dlibenzi@maticad.it
In reply to: Bruce Momjian (#3)
Re: [GENERAL] datetime ?#!!??@

Pathc PHSS_4630 applied !

Everything OK

----
Davide Libenzi at :
Maticad s.r.l.
Via Della Giustizia n.9 Fano (PS) 61032 Italy
Tel.: +39-721-808308 (ra) Fax: +39-721-808309
Email: <davidel@maticad.it>
WWW: <http://www.maticad.it&gt;

-----Original Message-----
From: Davide Libenzi <dlibenzi@maticad.it>
To: pgsql-hackers@postgreSQL.org <pgsql-hackers@postgreSQL.org>;
pgsql-general@postgreSQL.org <pgsql-general@postgreSQL.org>
Date: Thursday, July 23, 1998 1:55 PM
Subject: [GENERAL] datetime ?#!!??@

Show quoted text

I've successfully ported PostgreSQL to HPUX 9.0.* but there is a strange
behaviour with the datetime data type.

If do do this sequence :

$ createdb mydb
[OK]

$ psqk mydb

mydb==> create table foo (ffoo datetime);
[OK]

mydb==> insert into foo values ('01/01/1998');
[OK]

mydb==> select ffoo from foo;

The rusult is a totally wrong date with year 2140.

I've tried to set datestyle but the results don't change.

Has anybody a hint for me ?

----
Davide Libenzi at :
Maticad s.r.l.
Via Della Giustizia n.9 Fano (PS) 61032 Italy
Tel.: +39-721-808308 (ra) Fax: +39-721-808309
Email: <davidel@maticad.it>
WWW: <http://www.maticad.it&gt;