Re: odd convert_from bug - Mailing list pgsql-hackers

From Tom Lane
Subject Re: odd convert_from bug
Date
Msg-id 22822.1199928709@sss.pgh.pa.us
Whole thread Raw
In response to Re: odd convert_from bug  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: tzdata issue on cross-compiled postgresql
Next
From: Gavin Sherry
Date:
Subject: Re: Dynamic Partitioning using Segment Visibility Maps