Issue :
Unexpected error prompt while accessing reports
Analysis:
The exception caused is due to a syntax problem faced in the query formed while the user filter drop down is used on the SLA deviation report. The logs shared helped us to find the problematic syntax and we have the solution now to rectify the problem faced.
Log Trace:
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: boolean = integer
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 72
Solution:
1. Launch cmd prompt as Administrator and browse to <AnalyticsPlus home\pgsql\bin>
2. Execute psql.exe -h localhost -p 33366 -U postgres to connect to the Postgres database.
For example: D:\MEReports\AnalyticsPlus\pgsql\bin>psql.exe -h localhost -p 33366 -U postgres
3. Execute \c zreportsdb; to connect to reports database.
For example: postgres=# \c zreportsdb;
4. Execute below queries one by one,
Query #1:
CREATE OR REPLACE FUNCTION pg_catalog.toequals_udf(boolean, integer) RETURNS boolean AS $$ DECLARE x boolean; BEGIN x = ($1::integer = $2); RETURN x; END; $$ STRICT LANGUAGE plpgsql IMMUTABLE;
Query #2:
CREATE OPERATOR pg_catalog.= (PROCEDURE = toequals_udf, LEFTARG=boolean, RIGHTARG=integer);