James William Pye <[email protected]> writes:
> extern int SPI_execute_statements(const char *src);
> Execute multiple statements. Intended, primarily, for executing one or more
> DDL or DML statements. In contrast with the other execution functions, the
> RPT loop plans and executes the statement before planning and executing the
> next in order to allow subsequent statements to see the effects of all the
> formers. The read only argument is "omitted" as it should only be used in
> read-write cases(you can't read anything out of it).
This seems just about entirely useless. Why not code a loop around one
of the existing SPI execution functions?
> extern SPIPlanPtr SPI_prepare_statement(
> const char *src, int cursorOptions,
> SPIParamCallback pcb, void *pcb_arg,
> TupleDesc *resultDesc);
> Prepare a *single* statement and call the SPIParamCallback with the parameter
> information allowing the caller to store the information and supply constant
> parameters based on the identified parameter types, if need be. Also, if it
> returns rows, return the TupleDesc via *resultDesc.
This looks like it's most likely redundant with the stuff I added
recently for the plpgsql parser rewrite. Please see if you can use that
instead.
regards, tom lane
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers