postgresql/src/backend
Tom Lane dfd26f9c5f Make executor's SELECT INTO code save and restore original tuple receiver.
As previously coded, the QueryDesc's dest pointer was left dangling
(pointing at an already-freed receiver object) after ExecutorEnd.  It's a
bit astonishing that it took us this long to notice, and I'm not sure that
the known problem case with SQL functions is the only one.  Fix it by
saving and restoring the original receiver pointer, which seems the most
bulletproof way of ensuring any related bugs are also covered.

Per bug #6379 from Paul Ramsey.  Back-patch to 8.4 where the current
handling of SELECT INTO was introduced.
2012-01-04 18:30:55 -05:00
..
access Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
bootstrap Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
catalog Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
commands Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
executor Make executor's SELECT INTO code save and restore original tuple receiver. 2012-01-04 18:30:55 -05:00
foreign Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
lib Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
libpq Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
main Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nodes Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
optimizer Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
parser Fix coerce_to_target_type for coerce_type's klugy handling of COLLATE. 2012-01-02 14:43:45 -05:00
po Translation updates 2011-08-17 14:07:46 +03:00
port Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postmaster Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
regex Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
replication Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
rewrite Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
snowball Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
storage Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
tcop Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
tsearch Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
utils Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
common.mk Workaround for recursive make breakage 2011-01-13 09:32:06 +02:00
nls.mk Sort file list when creating gettext-files 2011-12-27 20:20:56 +02:00