Support Article
Incorrect SQL in PostgreSQL
SA-65791
Summary
User upgrades Pega 7.1.8 running on Oracle to Pega 7.4 that runs on PostgreSQL. A report definition is present with filter: .sstatus = "". However, PRPC displays this as: .sstatus IS NULL. No issue occurs on Oracle. However, the same SQL is emitted for PostgreSQL. PostgreSQL supports empty strings separately from NULLs. Some of the Oracle data exported from Pega 7.1.8, ends up as empty strings on Pega 7.4. Requirement for the SQL to pick up both empty strings and NULLs when the filter is; .sstatus = "" while running on Postgres.
Error Messages
Not Applicable
Steps to Reproduce
- Export a package from Oracle
- Import the package to Postgres. Some of the strings are NULL and some of the strings are blank. The report definition only considers the ones which are NULL
Root Cause
A defect or configuration issue in the operating environment. A specific filter is not present for Postgres to fetch the results for empty strings and NULL separately. This kind of support for Postgres can be achieved with the use of new filter operations like isEmptyOrNull and isNotEmptyOrNull which requires changes in the engine code. However, it causes a lot of regression and requires extensive testing. Hence, providing a hotfix is not feasible in this case to accommodate the change.
Resolution
An enhancement request, FDBK-28393, is created for consideration by Pega Product Management.
Published April 4, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.