Tom Lane wrote:
The point of adding is_top_level is to provide a simpler, more reliable
means for PreventTransactionChain and related functions to detect
whether a function is trying to invoke a non-transaction-block-safe
command.  Currently we rely on an ugly test involving seeing if the
statement node is in the QueryContext, but that's always been a kluge,
and I'm not sure that it works 100% even today.  I'd like to get rid
of the QueryContext global altogether.

Great! I once played with the idea of using a simpler MemoryContext implementation in the parser to save some CPU cycles, and PreventTransactionChain stopped working. I don't know if what I was doing was a good idea, but PreventTransactionChain is definitely a hack.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to