PQcmdTuples Function

public function PQcmdTuples(pgresult) result(res)

Returns the number of rows affected by the SQL command.

This function returns a string containning the number of rows affected by the SQL statement that generated the PGresult. This function can only be used following the execution of a SELECT, CREATE, TABLE AS, INSERT, UPDATE, DELETE, MERGE, MOVE, FETCH, or COPY statement, or an EXECUTE of a prepared query that contains an INSERT, UPDATE, DELETE, or MERGE statement. IF the command that generated the PGresult was anything else, PQcmdTuples returns an empty string. The caller should not free the return value directly. It will be freed when the associated PGresult handle is passed to PQclear.

cf. PostgreSQL Documentation

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in) :: pgresult

Return Value character(len=:), pointer


Contents