Issue with timestamp without time zone datatype with default value as now()/localtimestamp - Mailing list pgsql-general

From Deepika S Gowda
Subject Issue with timestamp without time zone datatype with default value as now()/localtimestamp
Date
Msg-id CADaTEeShceXK9CFifn3OzYUJQVfGqv3ab4d3fNkDpYvcUp_n3Q@mail.gmail.com
Whole thread Raw
Responses Re: Issue with timestamp without time zone datatype with default value as now()/localtimestamp
Re: Issue with timestamp without time zone datatype with default value as now()/localtimestamp
List pgsql-general
Hi,

On postgres 11.7 Master/Slave node, there is column named "createddate" with datatype "timestamp without time zone" with default value as "now()";

Column Name | Date Type                 | Default value
createddate |timestamp without time zone|Now()


Issue: From the java application , data is getting loaded into this table where we expect column value should be today's date with timestamp( "2020-07-10 10:56:43.21"). But, out of 3K records, 100 records are loaded as  "2019-07-10 10:56:43.21" (change in Year).

What could be the issue? we tried changing the default value to "localtimestamp".

Kindly help on this request

Regardss,
Deepika

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Postgresql-12 taking more time to execute the query
Next
From: Adrian Klaver
Date:
Subject: Re: Issue with timestamp without time zone datatype with default value as now()/localtimestamp