postgresql/src
Tom Lane 6ac2529cc2 Clean up a number of bogosities around pltcl's handling of the Tcl "result":
1. Directly reading interp->result is deprecated in Tcl 8.0 and later;
you're supposed to use Tcl_GetStringResult.  This code finally broke with
Tcl 8.5, because Tcl_GetVar can now have side-effects on interp->result even
though it preserves the logical state of the result.  (There's arguably a
Tcl issue here, because Tcl_GetVar could invalidate the pointer result of a
just-preceding Tcl_GetStringResult, but I doubt the Tcl guys will see it as
a bug.)

2. We were being sloppy about the encoding of the result: some places would
push database-encoding data into the Tcl result, which should not happen,
and we were assuming that any error result coming back from Tcl was in the
database encoding, which is not a good assumption.

3. There were a lot of calls of Tcl_SetResult that uselessly specified
TCL_VOLATILE for constant strings.  This is only a minor performance issue,
but I fixed it in passing since I had to look at all the calls anyway.

#2 is a live bug regardless of which Tcl version you are interested in,
so back-patch even to branches that are unlikely to be used with Tcl 8.5.
I went back as far as 8.0, which is as far as the patch applied easily;
7.4 was using a different error processing scheme that has got its own
problems :-(
2008-06-17 00:53:04 +00:00
..
backend Fix datetime input functions to correctly detect integer overflow when 2008-06-09 19:34:24 +00:00
bin Translation updates. 2008-06-05 23:37:16 +00:00
include Stamp 8.1.13 (except for configure.in/configure) 2008-06-08 22:14:47 +00:00
interfaces Stamp 8.1.13 (except for configure.in/configure) 2008-06-08 22:14:47 +00:00
makefiles Add $(CFLAGS) to the simplified build rule for .so libraries on Darwin. 2006-11-28 05:47:16 +00:00
pl Clean up a number of bogosities around pltcl's handling of the Tcl "result": 2008-06-17 00:53:04 +00:00
port Stamp 8.1.13 (except for configure.in/configure) 2008-06-08 22:14:47 +00:00
template SUNOS4_CC -> SUNOS_CC. 2005-07-30 03:07:42 +00:00
test Adjust timestamp regression tests to prevent two low-probability failure 2008-05-25 21:51:23 +00:00
timezone Update time zone data files to tzdata release 2008c (DST law changes in 2008-06-01 18:23:22 +00:00
tools Create a script to handle stamping release version numbers into files, 2008-06-10 18:09:08 +00:00
tutorial Use SQL standard '' rather than \' for tutorial/sample code. 2006-05-11 19:21:31 +00:00
utils PostgreSQL extension makefile framework ("pgxs"), by Fabien Coelho, with 2004-07-30 12:26:40 +00:00
bcc32.mak Add -N make flag to bcc builds from /src dir. 2005-05-13 18:12:35 +00:00
DEVELOPERS just testing a script... 1999-07-30 03:45:57 +00:00
Makefile Adjust src/tutorial Makefile so that it can use pgxs. This allows the 2005-01-13 18:23:22 +00:00
Makefile.global.in Fix problems with PGXS builds against an installation tree that was 2005-09-27 17:39:35 +00:00
Makefile.shlib Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. 2005-12-03 20:16:39 +00:00
nls-global.mk More locale fixes for pg_ctl. 2004-06-01 03:32:42 +00:00
win32.mak Attached is a makefile I hacked up to build pg_config under MSVC - the 2005-06-14 17:50:38 +00:00