Suddenly, I'm facing an issue when declaring a Postgres function with assignment inside:
-- :name create-func :!
create or replace function pg_temp.foo(period interval) returns text
as $$
declare years int;
begin
years := 42 -- !!! this
...
Hugsql thinks it's a named parameter and argues:
> Parameter Mismatch: := parameter data not found.
Is there any kind of "raw" or "verbatim" syntax or options to bypass it? I can jam it inside as a Clojure expression with a string " := " but this is too ugly, I'm afraid.
UPD: I'm afraid that Yesql suffers from the same issue too but haven't tried it yetSolved by quoting a single colon with \ :
https://hugsql.org/hugsql-in-detail/parameter-types/the-colon