Re: Proposed ProcessUtility() API additions - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Proposed ProcessUtility() API additions
Date
Msg-id 45EFC930.4030501@enterprisedb.com
Whole thread Raw
In response to Proposed ProcessUtility() API additions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: NikhilS
Date:
Subject: Re: Auto creation of Partitions
Next
From: "Simon Riggs"
Date:
Subject: Re: Auto creation of Partitions