![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 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? |
#3
| |||
| |||
|
|
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 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? It doesn't feel optimal to add a home brewed parser that parses the statements prior to prepare just to find out if I they should prevented. [snip] CmdType SPI_get_command_type(void* executionPlan) |
#4
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |