Josh Berkus <josh(at)agliodbs(dot)com> writes:
> but you can't do
> \set myvar "Select now()"
That's a seriously ridiculous syntax.
If you want something like this, a variant of \g that squirts the
results to a variable instead of a file would be more usable:
no quoting problems and no restriction to a single-line query.
regards, tom lane