Re: [HACKERS] elog and MemoryContextSwitchTo

2012-02-17 Thread Tom Lane
Gaetano Mendola writes: > or do I have to ripristinate the oldContext before to issue the elog ? No. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-ha

[HACKERS] elog and MemoryContextSwitchTo

2012-02-17 Thread Gaetano Mendola
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 -- Sent via pgsq