.. highlightlang:: us .. _pq_result_status: pq_result_status ================ .. index:: pq_result_status .. us.tag pq_result_status NOTREADYENGLISH New550 postgres :ref:`pq_result_status` returns the status of an SQL command .. function:: status = pq_result_status(res) .. us.return **Return Value** *status* is one of the following values: .. list-table:: :header-rows: 0 * - PGRES_EMPTY_QUERY (0) - * - PGRES_COMMAND_OK (1) - * - PGRES_TUPLES_OK (2) - * - PGRES_COPY_OUT (3) - * - PGRES_COPY_IN (4) - * - PGRES_BAD_RESPONSE (5) - * - PGRES_NONFATAL_ERROR (6) - * - PGRES_FATAL_ERROR (7) - .. us.params **Parameters** .. uparam:: res *res* is the res pointer returned by :ref:`pq_exec`. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.5.0 - New .. seealso:: :ref:`overview-postgresql` :sub:`id-1916841`