String comparison in filers gives syntax error in Postgres
4 August, 2016
Hello,
We are using :
Application Version: 7.1
Build: 20160722
Java Version: 1.7.0_65
Operating System: Linux 3.13.0-36-generic (amd64)
All of our filers with string comparison is generating sql with E'sting' which is throwing SQL syntax error from postgres like :
YF:2016-08-04 13:08:28: INFO (HtmlExporter:C) - Exporting report to HTML (421798: ratings trend)
YF:2016-08-04 13:08:28:ERROR (DBAction:doSelect) - Error occured selecting data: org.postgresql.util.PSQLException: ERROR: type "e" does not exist
Following is the sample SQL:
SELECT DISTINCT
"tbl_app_ratings"."ar_version",
"tbl_app_ratings"."ar_os",
"tbl_app_ratings"."ar_cat",
MAX("tbl_app_ratings"."ar_value")
FROM "tbl_app_ratings"
WHERE (
"tbl_app_ratings"."ar_date" BETWEEN '2016-07-04' AND '2016-08-03'
AND "tbl_app_ratings"."ar_cat" IN (E'star_1_count', E'star_2_count', E'star_3_count', E'star_4_count', E'star_5_count')
AND "tbl_app_ratings"."ar_country" NOT LIKE E'%US%'
)
GROUP BY
"tbl_app_ratings"."ar_cat",
"tbl_app_ratings"."ar_version",
"tbl_app_ratings"."ar_os"
We didn't do any changes to our reports or filters this use to work before 20160701 update release.
Please let us know how to fix this because most of our reports are broken now.
Thanks for the help.
We are using :
Application Version: 7.1
Build: 20160722
Java Version: 1.7.0_65
Operating System: Linux 3.13.0-36-generic (amd64)
All of our filers with string comparison is generating sql with E'sting' which is throwing SQL syntax error from postgres like :
YF:2016-08-04 13:08:28: INFO (HtmlExporter:C) - Exporting report to HTML (421798: ratings trend)
YF:2016-08-04 13:08:28:ERROR (DBAction:doSelect) - Error occured selecting data: org.postgresql.util.PSQLException: ERROR: type "e" does not exist
Following is the sample SQL:
SELECT DISTINCT
"tbl_app_ratings"."ar_version",
"tbl_app_ratings"."ar_os",
"tbl_app_ratings"."ar_cat",
MAX("tbl_app_ratings"."ar_value")
FROM "tbl_app_ratings"
WHERE (
"tbl_app_ratings"."ar_date" BETWEEN '2016-07-04' AND '2016-08-03'
AND "tbl_app_ratings"."ar_cat" IN (E'star_1_count', E'star_2_count', E'star_3_count', E'star_4_count', E'star_5_count')
AND "tbl_app_ratings"."ar_country" NOT LIKE E'%US%'
)
GROUP BY
"tbl_app_ratings"."ar_cat",
"tbl_app_ratings"."ar_version",
"tbl_app_ratings"."ar_os"
We didn't do any changes to our reports or filters this use to work before 20160701 update release.
Please let us know how to fix this because most of our reports are broken now.
Thanks for the help.
One more information is that error is from Redshift not postgres.
Never mind, I changed database to Amazon Redshift from PosgreSQL everything is OK.
Glad you got it all sorted Muthu!
Please let us know if you run into any issues, and hopefully we can assist before you fix it yourself ;)
Regards,
David
Please let us know if you run into any issues, and hopefully we can assist before you fix it yourself ;)
Regards,
David