elog and MemoryContextSwitchTo

Поиск
Список
Период
Сортировка
Искать

elog and MemoryContextSwitchTo

От:
Gaetano Mendola <mendola@gmail.com>
Дата:
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


Re: elog and MemoryContextSwitchTo

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Gaetano Mendola  writes:
> or do I have to ripristinate the oldContext before to issue the elog ?

No.
		regards, tom lane

FAQ