PQexecPrepared Function

public function PQexecPrepared(conn, stmtName, nParams, paramValues) result(res)

Sends a request to execute a prepared statement with given parameters, and waits for the result.

PQexecPrepared is like PQexecParams, but the command to be executed is spcified by naming a previously-prepared statement, instead of giving a query string. This feature allows commands that will be used repeated to be parsed and planned just once, rather than each time they are executed. The statement must have been prepared previously in the current session.

The parameters are identical to PQexecParams, except that the name of a prepared statement is given instead of a query string, and the paramTypes parameter is not present (it is not needed since the prepared statement's parameter types were determined when it was created).

cf. PostgreSQL Documentation

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: conn
character(len=*), intent(in) :: stmtName
integer(kind=int32), intent(in) :: nParams
character(len=*), intent(in) :: paramValues(:)

Return Value type(c_ptr)


Contents