Thomas Hallgren <thhal(at)mailblocks(dot)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