/*
 * call-seq:
 *    res.status()
 *
 * Returns the status of the query. The status value is one of:
 * * +EMPTY_QUERY+ -- The string sent to the server was empty.
 * * +COMMAND_OK+ -- Successful completion of a command returning no data.
 * * +TUPLES_OK+ -- Successful completion of a command returning data (such as a +SELECT+ or +SHOW+).
 * * +COPY_OUT+ -- Copy Out (from server) data transfer started.
 * * +COPY_IN+ -- Copy In (to server) data transfer started.
 * * +BAD_RESPONSE+ -- The server's response was not understood.
 * * +NONFATAL_ERROR+ -- A nonfatal error (a notice or warning) occurred.
 * * +FATAL_ERROR+ -- A fatal error occurred.
 *
 * For more information, see
 * PQresultStatus[http://www.postgresql.org/docs/7.4/static/libpq-exec.html]
 * which is called internally by this method.
 */
static VALUE
pgresult_status(obj)
  VALUE obj;
{
  int status;

  status = PQresultStatus(get_pgresult(obj));
  return INT2NUM(status);
}