git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 10ecc0d) | patch
Make executor's SELECT INTO code save and restore original tuple receiver.
Wed, 4 Jan 2012 23:30:55 +0000 (18:30 -0500)
Wed, 4 Jan 2012 23:30:55 +0000 (18:30 -0500)
commit dfd26f9c5f371437f243249025863ea9911aacaa
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.
src/backend/executor/execMain.c diff | blob | blame | history
src/test/regress/expected/select_into.out diff | blob | blame | history
src/test/regress/sql/select_into.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /