Add escape '\' to like expression in pgsql to fix problem cockroachdb

Cockroachdb doesn't properly handle escaping of _ in like expressions,
having "like ... escape '\'" makes it work, by disabling optimization that
causes this broken behaviour
This commit is contained in:
Paweł Chmielowski 2020-03-18 14:31:13 +01:00
parent 2d707cc0d2
commit 039d786e1f
1 changed files with 1 additions and 1 deletions

View File

@ -740,7 +740,7 @@ pgsql_escape() ->
(false) -> <<"'f'">>
end,
in_array_string = fun(X) -> <<"E'", (escape(X))/binary, "'">> end,
like_escape = fun() -> <<"">> end
like_escape = fun() -> <<"ESCAPE E'\\\\'">> end
}.
sqlite_sql_query(SQLQuery) ->