Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> +1. This looks quite nifty. Maybe useful too to have a default prefix
> via some setting.
Meh. I would expect that "\gset :foo" would work to specify a computed
prefix if you wanted it --- isn't that sufficient indirection? I'm not
thrilled with further expanding the set of magic variables in psql.
regards, tom lane