Hi,
It seems there's no way to do %-expansion in plpgsql when one is using
RAISE USING:
alvherre=# create or replace function f () returns void language plpgsql as $$
begin raise using message = 'hello %' || 'world'; return;
end;
$$;
CREATE FUNCTION
alvherre=# select f();
ERROR: hello %world
I would like the % to be expanded to some argument, but obviously
there's no way to pass the arguments that it should expand to. We could
do something like
RAISE USING message = 'hello %st %', args = 1, 'world'
but this is obviously going to be difficult, if not impossible, to
implement in the grammar. Perhaps
RAISE USING message = 'brave %st %', args = (1, 'world')
Thoughts?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.