Just a small note: imagine every table in your query needs schema, and the schema comes from runtime (prod, test, dev, etc). With this way, it won't work:
select * from :i:schema.users
because hugsql thinks schema.users is a nested parameter. But the following works for Postgres:
select * from :i:schema .users
which expands into
select * from "prod" .users
Postgres is OK with extra spaces between the schema and the entity name (table, view, function).