src/db/pgsql/PostgresResult.php
public static function statusToStr($status) {
        if (!is_int($status)) throw new IllegalTypeException('Illegal type of parameter $status: '.gettype($status));

        switch ($status) {
            case PGSQL_EMPTY_QUERY   : return 'PGSQL_EMPTY_QUERY';
            case PGSQL_COMMAND_OK    : return 'PGSQL_COMMAND_OK';
            case PGSQL_TUPLES_OK     : return 'PGSQL_TUPLES_OK';
            case PGSQL_COPY_OUT      : return 'PGSQL_COPY_OUT';
            case PGSQL_COPY_IN       : return 'PGSQL_COPY_IN';
            case PGSQL_BAD_RESPONSE  : return 'PGSQL_BAD_RESPONSE';
            case PGSQL_NONFATAL_ERROR: return 'PGSQL_NONFATAL_ERROR';
            case PGSQL_FATAL_ERROR   : return 'PGSQL_FATAL_ERROR';
        }
        return (string) $status;
    }
public static function statusToStr($status) {
        if (!is_int($status)) throw new IllegalTypeException('Illegal type of parameter $status: '.gettype($status));

        switch ($status) {
            case PGSQL_EMPTY_QUERY   : return 'PGSQL_EMPTY_QUERY';
            case PGSQL_COMMAND_OK    : return 'PGSQL_COMMAND_OK';
            case PGSQL_TUPLES_OK     : return 'PGSQL_TUPLES_OK';
            case PGSQL_COPY_OUT      : return 'PGSQL_COPY_OUT';
            case PGSQL_COPY_IN       : return 'PGSQL_COPY_IN';
            case PGSQL_BAD_RESPONSE  : return 'PGSQL_BAD_RESPONSE';
            case PGSQL_NONFATAL_ERROR: return 'PGSQL_NONFATAL_ERROR';
            case PGSQL_FATAL_ERROR   : return 'PGSQL_FATAL_ERROR';
        }
        return (string) $status;
    }
public static function statusToStr ( $ status ) { if ( ! is_int ( $ status ) ) throw new IllegalTypeException ( 'Illegal type of parameter $status: ' . gettype ( $ status ) ) ; switch ( $ status ) { case PGSQL_EMPTY_QUERY : return 'PGSQL_EMPTY_QUERY' ; case PGSQL_COMMAND_OK : return 'PGSQL_COMMAND_OK' ; case PGSQL_TUPLES_OK : return 'PGSQL_TUPLES_OK' ; case PGSQL_COPY_OUT : return 'PGSQL_COPY_OUT' ; case PGSQL_COPY_IN : return 'PGSQL_COPY_IN' ; case PGSQL_BAD_RESPONSE : return 'PGSQL_BAD_RESPONSE' ; case PGSQL_NONFATAL_ERROR : return 'PGSQL_NONFATAL_ERROR' ; case PGSQL_FATAL_ERROR : return 'PGSQL_FATAL_ERROR' ; } return ( string ) $ status ; }
Return a readable version of a result status code.

@param  int $status - status code as returned by pg_result_status(PGSQL_STATUS_LONG)

@return string
Return a readable version of a result status code .