Re: odd convert_from bug
| От | Tom Lane |
|---|---|
| Тема | Re: odd convert_from bug |
| Дата | |
| Msg-id | 22822.1199928709@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: odd convert_from bug (Andrew Dunstan <andrew@dunslane.net>) |
| Список | 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 по дате отправления: