/*
 * call-seq:
 *    conn.status()
 *
 * Returns the status of the connection. May be either:
 * * +CONNECTION_OK+ -- A good connection to the database exists.
 * * +CONNECTION_BAD+ -- The connection attempt failed.
 *
 * For more information, see
 * PQstatus[http://www.postgresql.org/docs/7.4/static/libpq-status.html]
 * which is called internally by this method.
 */
static VALUE
pgconn_status(obj)
  VALUE obj;
{
  int status = PQstatus(get_pgconn(obj));
  return INT2NUM(status);
}