Re: TM formating patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, bruce(at)momjian(dot)us
Subject: Re: TM formating patch
Date: 2007-02-05 16:02:28
Message-ID: 116.1170691348@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com> writes:
> This patch correct bug, when localized day or month names was incorectly
> trnasformed to lower or upper string.

I really dislike the API you've chosen for upper_str/lower_str ---
overwriting the input on the assumption that it's long enough is a
buffer overrun bug waiting to happen, because (at least in utf8)
changing case doesn't preserve the byte length of the string.
Please make them return a freshly palloc'd string instead.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-02-05 16:05:42 Re: [pgsql-patches] [GENERAL] Corrupt database? 8.1/FreeBSD6.0
Previous Message Tom Lane 2007-02-05 15:46:28 Re: [pgsql-patches] Phantom Command IDs, updated patch