mirror of
https://github.com/postgres/postgres.git
synced 2026-04-07 18:26:06 -04:00
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.
19 lines
594 B
SQL
19 lines
594 B
SQL
-- test some errors
|
|
CREATE EXTENSION test_ext1;
|
|
CREATE EXTENSION test_ext1 SCHEMA test_ext1;
|
|
CREATE EXTENSION test_ext1 SCHEMA test_ext;
|
|
CREATE SCHEMA test_ext;
|
|
CREATE EXTENSION test_ext1 SCHEMA test_ext;
|
|
|
|
-- finally success
|
|
CREATE EXTENSION test_ext1 SCHEMA test_ext CASCADE;
|
|
|
|
SELECT extname, nspname, extversion, extrelocatable FROM pg_extension e, pg_namespace n WHERE extname LIKE 'test_ext%' AND e.extnamespace = n.oid ORDER BY 1;
|
|
|
|
CREATE EXTENSION test_ext_cyclic1 CASCADE;
|
|
|
|
DROP SCHEMA test_ext CASCADE;
|
|
|
|
CREATE EXTENSION test_ext6;
|
|
DROP EXTENSION test_ext6;
|
|
CREATE EXTENSION test_ext6;
|