BUG #2882: jdbc driver: date returned from a stored proc is incorrect

From: "Ravi" <ravitx12(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2882: jdbc driver: date returned from a stored proc is incorrect
Date: 2007-01-11 11:40:19
Message-ID: 200701111140.l0BBeJpq022747@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2882
Logged by: Ravi
Email address: ravitx12(at)yahoo(dot)com
PostgreSQL version: 8.1.4
Operating system: Linux RHEL 3
Description: jdbc driver: date returned from a stored proc is
incorrect
Details:

This is a PostgreSQL driver issue.

The value returned should be Jan 1 1900, instead it returns Jan 2 1900.

The failure could be seen only on RHEL3 and not RHEL4.

Documented.

On Red Hat Enterprise Linux AS release 4 (Nahant Update 3) the milliseconds
returned is as follows

-2209028400000 = -25567.458333333333333333333333333 = Jan 1 1900

On Red Hat Enterprise Linux AS release 3 (Taroon Update 3) the milliseconds
returned is as follows
-2208952800000 = -25566.583333333333333333333333333 = Jan 2 1900

Negative indicates before Jan 1 1970.

Store Procedure used -

create or replace function proc_test_dt1 (a in date) returns date as'

begin

delete from test_dt;

insert into test_dt values(a);

return a;

end;

'

language 'plpgsql'

Table was created as follows:

create table test_dt(datefld date);

The inserted value looks fine.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Christopher Brian Jurado 2007-01-11 23:17:26 BUG #2883: TCP Keep Alive not enabled even after setting it in postresql.conf
Previous Message Mika Vimpari 2007-01-11 11:39:38 BUG #2881: FATAL: could not reattach to shared memory (Win32)