Postgrex error with sql library: message: "syntax error at or near \"$0\""

If you are on main you might be able to get away with this: sql/test/string_test.exs at 35d743c7715da9336269dfd7ea8426f4d2fa7ec6 · elixir-dbvisor/sql · GitHub

But your example might be an edge case that I haven’t gotten to yet.