Re: SPI function to investigate query semantics - Mailing list pgsql-patches

From Tom Lane
Subject Re: SPI function to investigate query semantics
Date
Msg-id 18705.1101932842@sss.pgh.pa.us
Whole thread Raw
In response to SPI function to investigate query semantics  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-patches
Thomas Hallgren <thhal@mailblocks.com> writes:
> Tom Lane wrote:
>> You do realize that SPI_execute will reject TransactionStmt anyway?
>> The example is therefore not very compelling ...
>>
> It won't reject savepoint related statements and that's what the example
> is for.

Really?

                if (queryTree->commandType == CMD_UTILITY)
                {
...
                    else if (IsA(queryTree->utilityStmt, TransactionStmt))
                    {
                        res = SPI_ERROR_TRANSACTION;
                        goto fail;
                    }
                }

Looks pretty rejectish to me...

            regards, tom lane

pgsql-patches by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: SPI function to investigate query semantics
Next
From: Thomas Hallgren
Date:
Subject: Re: SPI function to investigate query semantics