mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
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:
parent
2d707cc0d2
commit
039d786e1f
@ -740,7 +740,7 @@ pgsql_escape() ->
|
|||||||
(false) -> <<"'f'">>
|
(false) -> <<"'f'">>
|
||||||
end,
|
end,
|
||||||
in_array_string = fun(X) -> <<"E'", (escape(X))/binary, "'">> 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) ->
|
sqlite_sql_query(SQLQuery) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user