trace (PGconn)

    /*
     * call-seq:
     *    conn.trace( port )
     *
     * Enables tracing message passing between backend.
     * The trace message will be written to the _port_ object,
     * which is an instance of the class +File+.
     */
    static VALUE
    pgconn_trace(obj, port)
        VALUE obj, port;
    {
        OpenFile* fp;

        Check_Type(port, T_FILE);
        GetOpenFile(port, fp);

        PQtrace(get_pgconn(obj), fp->f2?fp->f2:fp->f);

        return obj;
    }