]> granicus.if.org Git - postgresql/commit
In recordExtensionInitPriv(), keep the scan til we're done with it
authorStephen Frost <sfrost@snowman.net>
Sat, 16 Apr 2016 01:57:15 +0000 (21:57 -0400)
committerStephen Frost <sfrost@snowman.net>
Sat, 16 Apr 2016 01:57:15 +0000 (21:57 -0400)
commit99f2f3c19ae7d6aa2950a9bdb549217c5a60d941
tree703eb73dea293b1cc79888cb9ebabafaaee9b17d
parentd2de44c2ce5c697a2de8089fb377816b2387107a
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.
src/backend/catalog/aclchk.c
src/test/modules/test_extensions/Makefile
src/test/modules/test_extensions/expected/test_extensions.out
src/test/modules/test_extensions/sql/test_extensions.sql
src/test/modules/test_extensions/test_ext6--1.0.sql [new file with mode: 0644]
src/test/modules/test_extensions/test_ext6.control [new file with mode: 0644]