Re: [HACKERS] Proposed ProcessUtility() API additions

2007-03-08 Thread Heikki Linnakangas
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

[HACKERS] Proposed ProcessUtility() API additions

2007-03-07 Thread Tom Lane
I'd like to change ProcessUtility to take a couple of additional parameters, which it in turn would pass down to those (relatively few) utility statements that need one or both: * query_string: source text of command, if known (can be NULL) * is_top_level: TRUE if command is being driven directly

Re: [HACKERS] Proposed ProcessUtility() API additions

2007-03-07 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: * is_top_level: TRUE if command is being driven directly from exec_simple_query or exec_execute_message, else FALSE (this would need to be passed through PortalRun, so it gets this parameter added too). ... The point of adding is_top_level is to

Re: [HACKERS] Proposed ProcessUtility() API additions

2007-03-07 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: 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.