/*
 * call-seq:
 *    conn.tty()
 *
 * Returns the connected pgtty.
 */
static VALUE
pgconn_tty(obj)
  VALUE obj;
{
  char *tty = PQtty(get_pgconn(obj));
  if (!tty) return Qnil;
  return rb_tainted_str_new2(tty);
}