Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> I'm not sure whether this is actually an overall improvement. I'm tempted
> to just coalesce(usename, {some default user}) instead.
I thought about that to begin with, but figured you wouldn't like it ;-)
regards, tom lane