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

From Thomas Hallgren
Subject Re: Preventing some SQL commands
Date
Msg-id thhal-0v7l8Ag/kby4bBeArFG543UUTht1dUY@mailblocks.com
Whole thread Raw
In response to Re: Preventing some SQL commands  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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 proposal is the erroneous assumption that
>there can be only one command in a SPI plan.
>  
>
Ok, so let the function return a list of CmdType's terminated by the 
CMD_UNKNOWN (i assume that's an invalid value). The list should be 
pfree'd by the caller:

CmdType* SPI_get_command_types(void* executionPlan)

how about that?

Regards,
Thomas Hallgren





pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: Preventing some SQL commands
Next
From: Bruce Momjian
Date:
Subject: Re: Beta5 in ~4 hours ...