Re: UPDATE: pg_dump fails due to invalid memory request

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UPDATE: pg_dump fails due to invalid memory request
Дата
Msg-id 9189.1125873957@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UPDATE: pg_dump fails due to invalid memory request  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-novice
Michael Fuhr <mike@fuhr.org> writes:
> On Sat, Sep 03, 2005 at 01:48:49PM -0700, Morgan Kita wrote:
>> Can someone explain to me why one works and not the other without
>> PG_DETOAST_DATUM?

> I don't know, but I'd guess that SELECT does some intermediate
> processing that detoasts the data before it gets to the type's
> output function.  Maybe one of the developers will explain what's
> happening.

printtup() in src/backend/access/common/printtup.c forcibly detoasts
toasted datums in order to avoid memory leaks.  I'm not sure this is
still necessary.  COPY used to do something similar, but now it prefers
to call datatype-specific functions in a short-term memory context
that it can reset after every tuple.

[ this whole thread seems very far off topic for -novice, by the by. ]

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: UPDATE: pg_dump fails due to invalid memory request
Следующее
От: Tom Lane
Дата:
Сообщение: Re: problems when comparing text with special chars