Re: [HACKERS] Inconsistent format() behavior for argument-count inconsistency

2013-01-18 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Why do we throw an error for too few arguments, but not too many? Not sure offhand, though I could see how it might be useful. A use-case might be that you have a variable template string which is user defined, where they can choose from the arguments that

[HACKERS] Inconsistent format() behavior for argument-count inconsistency

2013-01-18 Thread Tom Lane
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