Report a bug about timestamp data type - Mailing list pgsql-bugs

From Mengcheng.Zhong,Tony
Subject Report a bug about timestamp data type
Date
Msg-id BN6PR2201MB1538E8289E5D853441CA5C70A7C10@BN6PR2201MB1538.namprd22.prod.outlook.com
Whole thread Raw
List pgsql-bugs

Hi Postgresql developers:

I have a question very need your confirmation. Here are the detail information.


Postgresql version: 9.4 version, 

Language: Java,

IDE:Eclipse


Sql of the table

CREATE TABLE vldlt (
    id numeric(19,0) NOT NULL,
    pwdexpireson timestamp without time zone
);

The sql to execute

update vldlt set pwdexpireson =  "2018-10-28 02:34:45.078+00" when id = "123"


Here are the steps to reproduce the issue:

First - use the java code below:

           preparementStatement.setTimestamp(1,new Timestamp(new Date(System.currentTimeMillis()).getTime())) ;

Then - execute the preparementStatement.excuteUpdate() mehod to update the pwdexpireson field.

Finally - I get the statement is : update vldlt set pwdexpireson =  "2018-10-28 02:34:45.078+00" :: date when id = "123" and the result will be displayed in Pgadmin tool is '2018-10-28 00:00:00' without millisecond.


I don't know how the why the data type is date, rather than timestamp. In addition, sometimes the result is date, but sometimes is timestamp. 


I think it may be a bug for the check of timestamp data type for postgresql jdbc driver. Would you kindly give me some advice for this issue. 


Best regard,

Tony





pgsql-bugs by date:

Previous
From: Sergei Kornilov
Date:
Subject: Re: BUG #15498: Pg_Dump failed if Database name contains special characters(non english).
Next
From: Etsuro Fujita
Date:
Subject: Re: BUG #15449: file_fdw using program cause exit code error whenusing LIMIT