pg_result_status() returns status of result resource, or the command tag associated with the result. Possible values of type are PGSQL_STATUS_LONG or PGSQL_STATUS_STRING. The default is PGSQL_STATUS_LONG.
Possible return values are PGSQL_EMPTY_QUERY, PGSQL_COMMAND_OK, PGSQL_TUPLES_OK, PGSQL_COPY_TO, PGSQL_COPY_FROM, PGSQL_BAD_RESPONSE, PGSQL_NONFATAL_ERROR and PGSQL_FATAL_ERROR if PGSQL_STATUS_LONG is specified.
When PGSQL_STATUS_STRING is used, then the returned value is the command completion tag from PostgreSQL.