Re: patch (for 9.1) string functions

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Itagaki Takahiro" <itagaki(dot)takahiro(at)gmail(dot)com>, "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Merlin Moncure" <mmoncure(at)gmail(dot)com>, "Takahiro Itagaki" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch (for 9.1) string functions
Date: 2010-07-12 17:17:25
Message-ID: 4C3B07D50200002500033463@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> wrote:

> I'd like to move all proposed functions into the core, and not to
> add contrib/stringfunc.

> Still failed :-( I used UTF8 database with *locale=C* on 64bit
> Linux.
> char2wchar() doesn't seem to work on C locale. We should avoid
> using the function and converting mb chars to wide chars.
>
> select sprintf('>>>%10s %10d<<<', 'hello', 10);
> ! server closed the connection unexpectedly
> TRAP: FailedAssertion("!(!lc_ctype_is_c())", File: "mbutils.c",
> Line: 715)
>
> #0 0x00000038c0c332f5 in raise () from /lib64/libc.so.6
> #1 0x00000038c0c34b20 in abort () from /lib64/libc.so.6
> #2 0x00000000006e951d in ExceptionalCondition
> (conditionName=<value optimized out>, errorType=<value optimized
> out>, fileName=<value optimized out>, lineNumber=<value optimized
> out>) at assert.c:57
> #3 0x00000000006fa8bf in char2wchar (to=0x1daf188 L"", tolen=16,
> from=0x1da95b0 "%*s", fromlen=3) at mbutils.c:715
> #4 0x00007f8e8c436d37 in stringfunc_sprintf
> (fcinfo=0x7fff9bdcd4b0)
> at stringfunc.c:463

Based on this and subsequent posts, I've changed this patch's status
to "Waiting on Author".

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-07-12 17:36:18 Re: patch (for 9.1) string functions
Previous Message Guillaume Lelarge 2010-07-12 16:44:07 Re: CommitFest 2010-07 Plans and Call for Reviewers