postgreSQL.cursor.callProcedure
Syntax
postgreSQL.cursor.callProcedure (cursorRef, procname, params)
Params
cursorRef is a reference to a cursor as returned by postgreSQL.cursor.create.
procname is a string containing name of the procedure to be called.
params is an optional list containing the parameters of the procedure call.
Action
Calls the specified procedure on the server.
Returns
The number of rows in the result set, or -1 if the query did not generate a result set.
Examples
postgreSQL.cursor.callProcedure (cursorRef, "sqrt", {2.0})
« 1 //result set is one row with one field containg the floating point number 1.41421356
postgreSQL.cursor.callProcedure (cursorRef, "upper", {"jack"})
« 1 //result set is one row with one field containg the string "JACK"
Notes
This verb works just like postgreSQL.cursor.executeQuery as far as conversion of parameters from UserTalk to PostgreSQL data types and retrieving of results are concerned.
If an error occurs while executing the procedure call, the current transaction will automatically be rolled back.