check the execution status of stored procedure - Mailing list pgsql-general

From Yan Cheng Cheok
Subject check the execution status of stored procedure
Date
Msg-id 773983.94511.qm@web65703.mail.ac4.yahoo.com
Whole thread Raw
Responses Re: check the execution status of stored procedure
List pgsql-general
Currently, I try to call a stored procedure with void returned type.

    PGresult *res = PQexec(this->getConnection(), "SELECT * FROM create_tables()");
    if (PQresultStatus(res) != PGRES_COMMAND_OK)
    {
        PQclear(res);
        return false;
    }

Since the returned type of stored procedure is void, I will always fall in to the block

if (PQresultStatus(res) != PGRES_COMMAND_OK) {}

Is there any better way, I can check whether the stored procedure had been executed without problem?

Thanks and Regards
Yan Cheng CHEOK





pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Index question on postgres
Next
From: Yan Cheng Cheok
Date:
Subject: Return Single Row Result After Inserting (Stored Procedure)