I haven’t found a good way to handle dynamic queries in pg-typesafe yet.

For now, I type these manually, which is acceptable for my usage as they are pretty rare compared to static queries.

That seems like a reasonable tradeoff, thanks.