From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kyle Bateman <kyle(at)actarg(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: clock command regression in pltcl? |
Date: | 2010-01-23 06:50:12 |
Message-ID: | 2072.1264229412@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-01-25 02:17:09 | Re: clock command regression in pltcl? |
Previous Message | Tom Lane | 2010-01-23 06:26:28 | Re: clock command regression in pltcl? |