From: | "Mengcheng(dot)Zhong,Tony" <Tony(dot)Mengcheng(dot)Zhong(at)Kingland(dot)com> |
---|---|
To: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Report a bug about timestamp data type |
Date: | 2018-11-12 11:15:37 |
Message-ID: | BN6PR2201MB1538E8289E5D853441CA5C70A7C10@BN6PR2201MB1538.namprd22.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2018-11-12 11:41:40 | Re: BUG #15449: file_fdw using program cause exit code error when using LIMIT |
Previous Message | Sergei Kornilov | 2018-11-12 11:15:12 | Re: BUG #15498: Pg_Dump failed if Database name contains special characters(non english). |