check the execution status of stored procedure

Поиск
Список
Период
Сортировка
От Yan Cheng Cheok
Тема check the execution status of stored procedure
Дата
Msg-id 773983.94511.qm@web65703.mail.ac4.yahoo.com
обсуждение исходный текст
Ответы Re: check the execution status of stored procedure  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Index question on postgres
Следующее
От: Yan Cheng Cheok
Дата:
Сообщение: Return Single Row Result After Inserting (Stored Procedure)