Re: encoding conversion functions versus zero-length inputs

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: encoding conversion functions versus zero-length inputs
Date: 2009-03-01 17:52:51
Message-ID: 49AACB73.8090308@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> The REL7_4 members of the buildfarm are all red this morning,
> with this symptom in initdb:

Oh dear. I must confess that I didn't test the 7.4 commit, because the
7.4 branch isn't compiling on my laptop for some reason. Seemed safe
enough since the changed codepath hadn't been modified between 7.4 and
later version. I guess I need to fix my 7.4 installation after all...

> My first thought about fixing this was just to alter the check patch to
> pass a length-one instead of length-zero test string, but I now think
> that that's just hiding our heads in the sand; the right fix is to go
> around and make all these palloc's "len * ENCODING_GROWTH_RATE + 1"
> so that they are honestly accounting for the terminating null. It's
> a bit more tedious but it's the right fix.

Agreed, thanks for the fix.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2009-03-01 18:23:19 Re: cardinality()
Previous Message Pavel Stehule 2009-03-01 17:44:38 Re: cardinality()