Re: string function - "format" function proposal

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: string function - "format" function proposal
Date: 2010-10-14 02:11:43
Message-ID: 1287022125-sup-7556@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Itagaki Takahiro's message of mié oct 13 23:03:16 -0300 2010:
> On Thu, Oct 14, 2010 at 10:23 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > On Wed, Sep 29, 2010 at 3:59 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> >> [ updated patch, in response to a review from Itagaki Takahiro ]
> >
> > This patch appears to be waiting for a second round of review.
> > Itagaki-san, are you planning to do that?
>
> I can, but I was waiting for other people's comments about the design:
> - format() in core, that implements %s, %i, and %l.
> - substitute() for $n format and sprintf() that partially implements
> the same function in C in contrib/stringfunc.
>
> I don't like having three similar functions for the same purpose,
> but Pavel said they are the best solutions. What will be our consensus?

I don't have much love for moving the position stuff ($n) out of the main
function either. I've been meaning to take a look at how hard it would
be to integrate that into format() in core -- no luck :-(

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-14 02:12:15 Re: string function - "format" function proposal
Previous Message Tatsuo Ishii 2010-10-14 02:10:14 Re: How to reliably detect if it's a promoting standby