Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> It seems there's no way to do %-expansion in plpgsql when one is using
> RAISE USING:
That's intentional. Just use string concatenation if you need a
run-time-variable message.
regards, tom lane