Re: odd convert_from bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: odd convert_from bug
Date: 2008-01-10 01:31:49
Message-ID: 22822.1199928709@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> BTW, if calling pfree() at all here is actually a bug, then we should
> probably fix it in the back branches. It looks more to me like the
> problem was that pg_convert_from was calling pfree() with the wrong
> argument - src_encoding_name instead of dest_encoding_name.

Right. I just took it out because it wasn't really that useful;
in general SQL-callable functions can expect that they're called in
fairly short-lived contexts, and so retail pfree's aren't very
interesting unless you're talking about large chunks.

BTW, just for the record, the "(void *)" casts were poor style
too IMHO --- DatumGetPointer() would be better.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2008-01-10 02:06:38 Re: Dynamic Partitioning using Segment Visibility Maps
Previous Message Tom Lane 2008-01-10 01:25:44 Re: tzdata issue on cross-compiled postgresql