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:
Carlos Ruiz
February 22, 2020, 12:31 PM

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

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

Hi , alright, will do that instead.

Carlos Ruiz
February 23, 2020, 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 24, 2020, 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.

Assignee

Heng Sin Low

Reporter

Heng Sin Low

Labels

None

Tested By

None

Components

Fix versions

Priority

Major
Configure