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.
pull/32/head
Tom Lane 8 years ago
parent cfb758b6d9
commit 7d5b403b8d
  1. 6
      src/pl/plpgsql/src/expected/plpgsql_record.out
  2. 7
      src/pl/plpgsql/src/sql/plpgsql_record.sql

@ -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
-------------

@ -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;

Loading…
Cancel
Save