Re: patch (for 9.1) string functions

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch (for 9.1) string functions
Date: 2010-07-12 08:47:22
Message-ID: AANLkTinz_NOfHoFwqepQJUjSWgJVLtfVp4AVxMqS3O98@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

2010/7/12 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Sun, Jul 11, 2010 at 10:30 PM, Itagaki Takahiro
> <itagaki(dot)takahiro(at)gmail(dot)com> wrote:
>> 2010/7/9 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>>> I am sending a actualised patch
>>> * removed concat_json
>>> * renamed function rvsr to reverse
>>> * functions format, sprintf and concat* are stable now (as to_char for example)
>>
>> I'd like to move all proposed functions into the core, and not to add
>> contrib/stringfunc.
>> I think those functions are very useful and worth adding in core.
>> * concat(), concat_ws(), reverse(), left() and right() are ready to commit.
>> * format() is almost ready, except consensus of NULL representation.

what solution for this moment - be a consistent with RAISE statement ???

>> * sprintf() is also useful, but we cannot use swprintf() in it because
>>  there are many problems in converting to wide chars. We should
>>  develop mbchar-aware version of %s formatter.

ook I'll work on this - but there is same problem with NULL like a
format function

>> * IMHO, concat_sql() has very limited use cases. Boolean  and numeric
>>  values are not quoted, but still need product-specific conversions because
>>  some DBs prefer 1/0 instead of true/false.
>>  Also, dblink_build_sql_insert() provides similar functionality. Will
>> we have both?
>

I can remove it - when I checked it I found so it doesn't well
serialize PostgreSQL specific types as array or record, so I am not
against to remove it now.

> I'm all in favor of putting such things in core as are supported by
> multiple competing products, but is that really true for all of these?
>

I have not a strong opinion on this - I would to like see reverse and
format in core. But I think, so contrib is enought. Can somebody from
commiters to decide it, please? Any sprintf implemenation needs lots
of code - minimally for this function I prefer contrib for this
function.

Regards

Pavel Stehule

> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise Postgres Company
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2010-07-12 09:36:33 Re: pg_stat_transaction patch
Previous Message Thom Brown 2010-07-12 08:42:36 Re: [PATCH] Re: Issue: Deprecation of the XML2 module 'xml_is_well_formed' function