Unexpected error prompt while accessing reports
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.
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.
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,
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;
CREATE OPERATOR pg_catalog.= (PROCEDURE = toequals_udf, LEFTARG=boolean, RIGHTARG=integer);