Re: Re[2]: [BUGS] BUG #11761: range_in dosn't work via direct functional call

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re[2]: [BUGS] BUG #11761: range_in dosn't work via direct functional call
Дата
Msg-id 6758.1414252645@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re[2]: [BUGS] BUG #11761: range_in dosn't work via direct functional call  (Dunauskas Oleg <olegjobs@mail.ru>)
Список pgsql-bugs
=?UTF-8?B?RHVuYXVza2FzIE9sZWc=?= <olegjobs@mail.ru> writes:
> And one more question, for example, I do some memory allocation via palloc in _PG_Init().
> Is this memory preserve for all life time after library is loaded into postgresql process?

Probably not --- CurrentMemoryContext would most likely be pointing at a
statement-lifespan context.  If you want that behavior, I'd recommend
explicitly allocating in TopMemoryContext.

(Also, you would not be needing to ask that question if you were using
an --enable-cassert build for testing.  Which is *highly* recommended
when developing C code for Postgres.)

            regards, tom lane



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

Предыдущее
От: Dunauskas Oleg
Дата:
Сообщение: Re[2]: [BUGS] BUG #11761: range_in dosn't work via direct functional call
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: tsquery @> operator bugs