Open olavloite opened 7 months ago
Hello,
we are facing the same issue:
@Query("SELECT
r FROM DNSRecordEntity r WHERE LOWER(r.name) LIKE LOWER(?1) OR LOWER(r.irn) LIKE LOWER(?1)")
{"code":"500","message":"JDBC exception executing SQL ...ERROR: Postgres function like_escape(text, text) is not supported - Statement: 'select ... from ttdev de1_0 where lower(de1_0.name) like lower($1) escape '' or lower(de1_0.xx) like lower($2) escape '''] [n\/a]","status":"Internal Server Error"}
is there any solution ? Thanks
It depends a bit on the use case. One possible option could be to use the starts_with
function like in this example: https://github.com/GoogleCloudPlatform/pgadapter/blob/05a09bcad9dd51b40207e0f56bc0aace3f7f8e7f/samples/java/spring-data-jpa/src/main/java/com/google/cloud/spanner/pgadapter/sample/repository/SingerRepository.java#L26
If that is not an option in your case, then I can have a look at adding a query replacement in PGAdapter. We already replace some known function calls and statements, so this could be added to that.