add_months function in postgresql is not consistent with its oracle version - it truncates the date meanwhile the oracle version doesn't.
On a similar line, the adddays function is expected to behave same in oracle vs postgresql, and expected to behave similar to add_months. So, no truncation must happen. Furthermore, the oracle function is capable of managing adding partial days (for example to add hours) while the postgres version doesn't.
Also, found the subtractdays in postgresql are not defined as immutable (performance improvement).
Hi @Martin Schönbeck, I think it must be a custom view, you need to delete it before and recreate it after the script is executed.
There is no "CREATE OR REPLACE" way.
Regards,
Carlos Ruiz
Martin Schönbeck
September 21, 2020 at 9:22 AM
(edited)
when applying the postgres script I got problems, because an operator which gets to be deleted is used in a view. Better would be to create or replace instead of deleting and creating.
add_months function in postgresql is not consistent with its oracle version - it truncates the date meanwhile the oracle version doesn't.
On a similar line, the adddays function is expected to behave same in oracle vs postgresql, and expected to behave similar to add_months.
So, no truncation must happen. Furthermore, the oracle function is capable of managing adding partial days (for example to add hours) while the postgres version doesn't.
Also, found the subtractdays in postgresql are not defined as immutable (performance improvement).