Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
Date
Msg-id 20130128173224.GS16126@tamriel.snowman.net
Whole thread Raw
In response to Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
List 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

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: in-catalog Extension Scripts and Control parameters (templates?)
Next
From: Alexander Korotkov
Date:
Subject: Re: WIP: index support for regexp search