Re: Re: proposal: a width specification for s specifier
(format function), fix behave when positional and ordered placeholders are used
From:
Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To:
Stephen Frost <sfrost(at)snowman(dot)net>
Cc:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, 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-29 08:45:29
Message-ID:
CAEZATCWeVkuEqUZLQBOsfLyrDxJtp9QPO5KPV_ivUqH-1unA1w@mail.gmail.com (view raw or flat )
Thread:
2012-11-16 09:42:26 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-12-29 18:44:59 from Stephen Frost <sfrost(at)snowman(dot)net>
2012-12-29 18:53:51 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-12-29 19:00:45 from Stephen Frost <sfrost(at)snowman(dot)net>
2012-12-29 19:14:52 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-12-29 19:28:58 from Stephen Frost <sfrost(at)snowman(dot)net>
2012-12-30 16:22:47 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-12-30 16:27:21 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-12-31 03:36:05 from Stephen Frost <sfrost(at)snowman(dot)net>
2012-12-31 05:21:57 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-12-31 12:27:30 from Stephen Frost <sfrost(at)snowman(dot)net>
2012-12-31 12:38:29 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2012-12-31 16:56:20 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-01-26 10:58:32 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-01-28 08:07:15 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-01-28 15:44:54 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-01-28 16:21:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-28 17:32:24 from Stephen Frost <sfrost(at)snowman(dot)net>
2013-01-28 20:32:02 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-01-28 20:40:25 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-01-28 20:50:35 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-01-28 21:08:25 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-29 17:19:56 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-01-29 08:19:39 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-01-29 08:45:29 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-01-31 20:43:24 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-02-01 05:37:39 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-02-09 12:38:00 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-02-09 18:30:17 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-02-10 09:58:55 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-02-10 12:37:07 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-02-11 09:01:28 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-02-11 14:29:23 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-02-13 07:58:39 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-02-13 15:19:20 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-02-28 09:47:02 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
2013-02-28 11:25:06 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
2013-02-28 15:01:44 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-03-01 19:22:04 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-03-05 10:23:26 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
2013-03-05 13:46:37 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-03-05 14:21:40 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-03-05 15:03:35 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-03-15 03:00:38 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-03-19 07:54:23 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
2013-03-05 15:41:38 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-03-08 07:06:43 from Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
2013-02-28 12:14:20 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-01-29 17:28:20 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2013-01-29 17:18:54 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Lists:
pgsql-hackers
On 29 January 2013 08:19, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> * The width field is optional, even if the '-' flag is specified. So
> '%-s' is perfectly legal and should be interpreted as '%s'. The
> current implementation treats it as a width of 0, which is wrong.
>
Oh, but of course a width of 0 is the same as no width at all, so the
current code is correct after all. That's what happens if I try to
write emails before I've had my caffeine :-)
I think my other points remain valid though. It would still be neater
to parse the flags separately from the width field, and then all
literal numbers that appear in the format should be positive.
Regards,
Dean
In response to
Responses
pgsql-hackers by date
Next :From: Heikki LinnakangasDate: 2013-01-29 08:45:42
Subject : Re: Patches for TODO item: Avoid truncating empty OCDR temp tables
on COMMIT
Previous :From : Dean RasheedDate : 2013-01-29 08:19:39
Subject : Re: Re: proposal: a width specification for s specifier
(format function), fix behave when positional and ordered placeholders are used