Search Postgresql Archives

check the execution status of stored procedure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


      


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux