I wrote:
> I am not sure if this is a bug or an intentional change on their part.
> Apparently "clock" was completely rewritten in 8.5, with a lot more
> features, which could mean it's not safe anymore.  But I don't see
> any explicit acknowledgement in the release notes that it's now
> considered unsafe.

Oh, this is interesting: tclInterp.c's SlaveCreate() has a special
purpose hack now:

    /*
     * The [clock] command presents a safe API, but uses unsafe features in
     * its implementation. This means it has to be implemented in safe interps
     * as an alias to a version in the (trusted) master.
     */

    if (safe) {
        Tcl_Obj *clockObj;
        int status;

        TclNewLiteralStringObj(clockObj, "clock");
        Tcl_IncrRefCount(clockObj);
        status = AliasCreate(interp, slaveInterp, masterInterp, clockObj,
                clockObj, 0, NULL);
        Tcl_DecrRefCount(clockObj);
        if (status != TCL_OK) {
            goto error2;
        }
    }

So apparently it's still *supposed* to work, but there's something about
the way we are using tcl that makes it not work.  Any tcl experts in the
house?

                        regards, tom lane

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to