In recordExtensionInitPriv(), keep the scan til we're done with it
For reasons of sheer brain fade, we (I) was calling systable_endscan()
immediately after systable_getnext() and expecting the tuple returned
by systable_getnext() to still be valid.
That's clearly wrong. Move the systable_endscan() down below the tuple
usage.
Discovered initially by Pavel Stehule and then also by Alvaro.
Add a regression test based on Alvaro's testing.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/99f2f3c19ae7d6aa2950a9bdb549217c5a60d941
Modified Files
--------------
src/backend/catalog/aclchk.c | 4 ++--
src/test/modules/test_extensions/Makefile | 6 +++---
src/test/modules/test_extensions/expected/test_extensions.out | 3 +++
src/test/modules/test_extensions/sql/test_extensions.sql | 4 ++++
src/test/modules/test_extensions/test_ext6--1.0.sql | 1 +
src/test/modules/test_extensions/test_ext6.control | 5 +++++
6 files changed, 18 insertions(+), 5 deletions(-)