Re: Preventing some SQL commands - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Preventing some SQL commands
Date
Msg-id 9137.1101062117@sss.pgh.pa.us
Whole thread Raw
In response to Preventing some SQL commands  (Thomas Hallgren <thhal@mailblocks.com>)
Responses Re: Preventing some SQL commands  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-hackers
Thomas Hallgren <thhal@mailblocks.com> writes:
> In a PL language it's sometimes desirable to prevent execution of some 
> commands. I would like to prevent the commands "begin [work or 
> transaction]", "commit", and "rollback",  completely and I would like to 
> force the user to use explicit methods for the savepoint methods.

If you are executing through SPI then those operations are disallowed
already.

> I wonder if there's any way to extract the nature of a command from the 
> execution plan returned by SPI_prepare. If not, would it be very 
> difficult to add?

The main problem with this proposal is the erroneous assumption that
there can be only one command in a SPI plan.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: bug/issue tracking system?
Next
From: James William Pye
Date:
Subject: Re: Preventing some SQL commands