regression=# select format('%s %s', 'foo', 'bar');
format
---------
foo bar
(1 row)
regression=# select format('%s %s', 'foo', 'bar', 'baz');
format
---------
foo bar
(1 row)
regression=# select format('%s %s', 'foo');
ERROR: too few arguments for format
Why do we throw an error for too few arguments, but not too many?
(This came up when I started wondering whether the proposed VARIADIC
feature would really be very useful for format(), since it needs a
format string that matches up with its arguments.)
regards, tom lane