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 18597.1101932339@sss.pgh.pa.us
Whole thread Raw
In response to SPI function to investigate query semantics  (Thomas Hallgren <thhal@mailblocks.com>)
Responses Re: SPI function to investigate query semantics  (Thomas Hallgren <thhal@mailblocks.com>)
Re: SPI function to investigate query semantics  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-patches
Thomas Hallgren <thhal@mailblocks.com> writes:
> I think that this function is needed so that PL/<lang> authors like
> myself have a way to investigate the semantics of a prepared query.

Which you will do what with?  I'm not sure I see the point of treating
_SPI_plan as an opaque type while assuming you know what to do with a
Query.

> For me this is essential since I want to prevent that savepoint related
> statements are executed using normal SQL so that I can enforce the use
> of the methods stipulated by the connection interface.

You do realize that SPI_execute will reject TransactionStmt anyway?
The example is therefore not very compelling ...

            regards, tom lane

pgsql-patches by date:

Previous
From: Jon Jensen
Date:
Subject: Update for documentation on CVS
Next
From: Thomas Hallgren
Date:
Subject: Re: SPI function to investigate query semantics