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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
Date: 2013-01-28 21:08:25
Message-ID: 25846.1359407305@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
> On 28 January 2013 20:40, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> 2013/1/28 Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>:
>>> flags - not currently implemented. Pavel's second patch adds support
>>> for the '-' flag for left justified string output. However, I think
>>> this should support all datatypes (i.e., %I and %L as well as %s).

>> no - surely not - I% and L% is PostgreSQL extension and left or right
>> alignment is has no sense for PostgreSQL identifiers and PostgreSQL
>> literals.

> Left/right alignment and padding in printf() apply to all types, after
> the data value is converted to a string. Why shouldn't that same
> principle apply to %I and %L?

I agree with Dean --- it would be very strange for these features not to
apply to all conversion specifiers (excepting %% of course, which isn't
really a conversion specifier but an escaping hack).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-01-28 21:23:09 Re: Performance Improvement by reducing WAL for Update Operation
Previous Message Dean Rasheed 2013-01-28 20:50:35 Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used