elog and MemoryContextSwitchTo

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема elog and MemoryContextSwitchTo
Дата
Msg-id jhml9d$1m3p$1@news.hub.org
обсуждение исходный текст
Ответы Re: elog and MemoryContextSwitchTo  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi all,

Is the following code well formed?

oldContext = MemoryContextSwitchTo(newContext);
....
if (something_bad) {  elog(ERROR, ...);
}
...
MemoryContextSwitchTo(oldContext);


or do I have to ripristinate the oldContext before to issue the elog ?



Regards
Gaetano Mendola



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Notes about fixing regexes and UTF-8 (yet again)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: elog and MemoryContextSwitchTo