Re: [HACKERS] Preventing some SQL commands

2004-11-22 Thread Thomas Hallgren
James William Pye bool (*SPI_UtilityFilter) (NodeTag aStmt); To a "void SPI_FilterUtilities(void *execPlan, SPI_UtilityFilter fp)". Throwing an error if deemed necessary by the pointed to function. After browsing the code a bit more, I realize that the above suggestion is superior to my own. It

Re: [HACKERS] Preventing some SQL commands

2004-11-21 Thread Thomas Hallgren
Tom Lane wrote: ... I would like to prevent the commands "begin [work or transaction]", "commit", and "rollback", completely If you are executing through SPI then those operations are disallowed already. Ah, yes I had forgotten that. One problem less to solve. The main problem with this propo

Re: [HACKERS] Preventing some SQL commands

2004-11-21 Thread Thomas Hallgren
James William Pye wrote: Although, I'm inclined to think that if you require this sort of flexibility you should probably think about writing your own SPI. I think it's far better if we all focus our efforts to improve on the PostgreSQL SPI. That way, all PL's will benefit. That's the reason I

Re: [HACKERS] Preventing some SQL commands

2004-11-21 Thread James William Pye
On Sun, 2004-11-21 at 16:55 +0100, Thomas Hallgren wrote: > 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 e

Re: [HACKERS] Preventing some SQL commands

2004-11-21 Thread Tom Lane
Thomas Hallgren <[EMAIL PROTECTED]> 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 method

[HACKERS] Preventing some SQL commands

2004-11-21 Thread Thomas Hallgren
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. I wonder if there's an