postgresql/src
Tom Lane 36149aac15 Fix an ancient logic error in plpgsql's exec_stmt_block: it thought it could
get away with not (re)initializing a local variable if the variable is marked
"isconst" and not "isnull".  Unfortunately it makes this decision after having
already freed the old value, meaning that something like

   for i in 1..10 loop
     declare c constant text := 'hi there';

leads to subsequent accesses to freed memory, and hence probably crashes.
(In particular, this is why Asif Ali Rehman's bug leads to crash and not
just an unexpectedly-NULL value for SQLERRM: SQLERRM is marked CONSTANT
and so triggers this error.)

The whole thing seems wrong on its face anyway: CONSTANT means that you can't
change the variable inside the block, not that the initializer expression is
guaranteed not to change value across successive block entries.  Hence,
remove the "optimization" instead of trying to fix it.
2007-02-08 18:38:08 +00:00
..
backend Fix an error in the original coding of holdable cursors: PersistHoldablePortal 2007-02-06 22:49:42 +00:00
bin Translation updates 2007-01-31 08:20:42 +00:00
corba make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
include Stamp releases 8.2.3, 8.1.8, 8.0.12. No release notes yet. 2007-02-07 03:48:21 +00:00
interfaces Stamp releases 8.2.3, 8.1.8, 8.0.12. No release notes yet. 2007-02-07 03:48:21 +00:00
makefiles Remove $(DESTDIR) from the pgxs BE_DLLLIBS= -L path for Darwin. 2006-01-19 21:20:32 +00:00
pl Fix an ancient logic error in plpgsql's exec_stmt_block: it thought it could 2007-02-08 18:38:08 +00:00
port Stamp releases 8.2.3, 8.1.8, 8.0.12. No release notes yet. 2007-02-07 03:48:21 +00:00
template Support Sun's compiler on SunOS4 (a/k/a Solaris 9). Per ayan@ayan.net 2004-12-29 23:47:40 +00:00
test Fix back-branch pg_regress scripts to try the "canonical" expected file if we 2006-10-09 01:45:49 +00:00
timezone Update timezone data to tzdata2006p zic distribution. It seems Western 2006-11-28 19:37:23 +00:00
tools Update error message and documentation for fsync test. 2005-11-16 03:44:51 +00:00
tutorial Change \' to '', for SQL standards compliance. Backpatch to 7.3, 7.4, 2006-05-21 19:57:40 +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:13:16 +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 Have libpgport link before libpq so that PG client applications are more 2005-03-25 18:18:41 +00:00
Makefile.shlib Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. 2005-12-03 20:16:50 +00:00
nls-global.mk More locale fixes for pg_ctl. 2004-06-01 03:32:42 +00:00
win32.mak $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00