On Thursday, April 19, 2018, W. Trevor King <wking(at)tremily(dot)us> wrote:
> Is there
> an idiomatic way to approach this problem?
>
>
I would use pl/pgsql as the language and build a query using a combination
of text literals and the format() function - invoking via pl/pgsql's
EXECUTE command.
David J.