Doug Gorley <doug(dot)gorley(at)gmail(dot)com> writes:
> That looks like exactly what I want. Is there an easy way to cast that
> to a string so that I can concatenate it into a GRANT statement?
Well, since 8.3 you just cast it to a string ;-)
In older versions I'd suggest a plpgsql wrapper function. plpgsql has
always been very lax about letting you assign anything to anything,
so you can cast by assignment.
regards, tom lane