Small improvement for plpgsql regression test.

Use DISCARD PLANS instead of a reconnect to force reconstruction of
a cached plan; this corresponds more nearly to what people might
actually do in practice.
This commit is contained in:
Tom Lane 2018-05-18 12:10:19 -04:00
parent cfb758b6d9
commit 7d5b403b8d
2 changed files with 9 additions and 4 deletions

View File

@ -424,9 +424,11 @@ select sillyaddone(42);
alter table mutable drop column f1;
alter table mutable add column f1 float8;
-- currently, this fails due to cached plan for "r.f1 + 1" expression
-- (but we can't actually show that, because a CLOBBER_CACHE_ALWAYS build
-- will succeed)
-- select sillyaddone(42);
\c -
-- but it's OK after a reconnect
-- but it's OK if we force plan rebuilding
discard plans;
select sillyaddone(42);
sillyaddone
-------------

View File

@ -274,9 +274,12 @@ alter table mutable drop column f1;
alter table mutable add column f1 float8;
-- currently, this fails due to cached plan for "r.f1 + 1" expression
-- (but we can't actually show that, because a CLOBBER_CACHE_ALWAYS build
-- will succeed)
-- select sillyaddone(42);
\c -
-- but it's OK after a reconnect
-- but it's OK if we force plan rebuilding
discard plans;
select sillyaddone(42);
alter table mutable drop column f1;