Replace SYSDATE with getDate()

Description

  1. Replace usage of SYSDATE with existing getDate() function

  2. Modify PostgreSQL’s version of getDate() to return statement_timestamp() instead of now()

  3. Code that handle Default value - check the presence of SYSDATE and replace it with getDate()

 

 

Environment

None

Activity

Show:

Heng Sin Low February 24, 2020 at 1:02 AM

Hi , since we already have that in db, I will just use that to replace sysdate. Will change the postgresql version to return statement_timestamp instead.

Carlos Ruiz February 23, 2020 at 12:54 PM

Related to this same ticket, we have a function getDate() in the database (both oracle and postgresql) which is wrong because is returning now() instead of statement_timestamp().

I guess it has been harmless in code because getDate is being converted to statement_timestamp, but if used out of iDempiere it could potentially get different results.

Would be better to fix that postgresql function too to make it consistent with the oracle version.

Heng Sin Low February 23, 2020 at 9:14 AM

Hi , alright, will do that instead.

Carlos Ruiz February 22, 2020 at 12:31 PM

Hi , it sounds simpler just to implement statement_timestamp() in oracle calling SYSDATE, no need for a new function in postgres.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created February 18, 2020 at 1:10 AM
Updated September 19, 2020 at 9:41 AM
Resolved March 3, 2020 at 9:39 AM