aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/expected/sql-binary.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-01-25 01:58:14 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-01-25 01:58:14 +0000
commite7dcfd05f3f0ac4c80d5bd26973a748230f9cbe1 (patch)
tree00621ae14d1e54c138c445e279bc46f2f5443312 /src/interfaces/ecpg/test/expected/sql-binary.c
parent56cbb611ec749ba867a4cfc09c8b7df0f4446620 (diff)
downloadpostgresql-e7dcfd05f3f0ac4c80d5bd26973a748230f9cbe1.tar.gz
postgresql-e7dcfd05f3f0ac4c80d5bd26973a748230f9cbe1.zip
Apply Tcl_Init() to the "hold" interpreter created by pltcl.
You might think this is unnecessary since that interpreter is never used to run code --- but it turns out that's wrong. As of Tcl 8.5, the "clock" command (alone among builtin Tcl commands) is partially implemented by loaded-on-demand Tcl code, which means that it fails if there's not unknown-command support, and also that it's impossible to run it directly in a safe interpreter. The way they get around the latter is that Tcl_CreateSlave() automatically sets up an alias command that forwards any execution of "clock" in a safe slave interpreter to its parent interpreter. Thus, when attempting to execute "clock" in trusted pltcl, the command actually executes in the "hold" interpreter, where it will fail if unknown-command support hasn't been introduced by sourcing the standard init.tcl script, which is done by Tcl_Init(). (This is a pretty dubious design decision on the Tcl boys' part, if you ask me ... but they didn't.) Back-patch all the way. It's not clear that anyone would try to use ancient versions of pltcl with a recent Tcl, but it's not clear they wouldn't, either. Also add a regression test using "clock", in branches that have regression test support for pltcl. Per recent trouble report from Kyle Bateman.
Diffstat (limited to 'src/interfaces/ecpg/test/expected/sql-binary.c')
0 files changed, 0 insertions, 0 deletions