Fix ParadeDB fuzzy query parameter casting

Cast the bound search parameter through text before  so Postgrex can handle the prepared statement type inference. Add matching test assertion updates.
This commit is contained in:
Lain Soykaf 2026-03-05 17:34:48 +04:00
commit 4e65bbf134
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -235,7 +235,7 @@ defmodule Pleroma.Search.ParadeDB do
end
defp search_query_param_sql(0), do: "$1"
defp search_query_param_sql(distance), do: "$1::pdb.fuzzy(#{distance})"
defp search_query_param_sql(distance), do: "($1::text)::pdb.fuzzy(#{distance})"
defp create_table_sql(table) do
"""