Re: Preventing some SQL commands

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Preventing some SQL commands
Date: 2004-11-21 23:14:05
Message-ID: thhal-0v7l8Ag/kby4bBeArFG543UUTht1dUY@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-11-21 23:32:53 Re: Beta5 in ~4 hours ...
Previous Message Thomas Hallgren 2004-11-21 23:06:20 Re: Preventing some SQL commands