Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
Stephen Frost <sfrost@snowman.net>
From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Dean Rasheed <dean.a.rasheed@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-28T17:32:24Z
Lists: pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote: > Both. If we had done this when we first implemented format(), it'd be > fine, but it's too late to change it now. There very likely are > applications out there that depend on the current behavior. As Dean > says, it's not incompatible with SUS, just a superset, so ISTM this > patch is proposing to remove documented functionality --- for no very > strong reason. It's only a "superset" of the very poor subset of printf()-like functionality that we currently support through the format() function. If we can actually match glibc/SUS (which I don't believe the initial patch did..) and support a mix of explicitly specified arguments and implicit arguments, along with the various width, precision, and other format specifications, then fine by me. I'm not convinced that's actually possible due to the ambiguity which will certainly arise and I'm quite sure the documentation that explains what we do in each case will deserve it's own chapter. Thanks, Stephen