高健 wrote: > I am new to PostgreSQL's SPI(Server Programming Interface). > > I can understand PostgreSQL's exampel of using SPI. But I am not sure about SPI_prepare's parameter. > > void * SPI_prepare(const char * command, int nargs, Oid * argtypes) > > > Can somebody kindly give an example of using SPI_prepare ? Untested: Oid types[] = { INT4OID }; SPIPlanPtr planptr = SPI_prepare("SELECT val FROM tab WHERE id = $1", 1, types); Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general