Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7d5b403

Browse files
committed
Small improvement for plpgsql regression test.
Use DISCARD PLANS instead of a reconnect to force reconstruction ofa cached plan; this corresponds more nearly to what people mightactually do in practice.
1 parentcfb758b commit7d5b403

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

‎src/pl/plpgsql/src/expected/plpgsql_record.out

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,11 @@ select sillyaddone(42);
424424
alter table mutable drop column f1;
425425
alter table mutable add column f1 float8;
426426
-- currently, this fails due to cached plan for "r.f1 + 1" expression
427+
-- (but we can't actually show that, because a CLOBBER_CACHE_ALWAYS build
428+
-- will succeed)
427429
-- select sillyaddone(42);
428-
\c -
429-
-- but it's OK after a reconnect
430+
-- but it's OK if we force plan rebuilding
431+
discard plans;
430432
select sillyaddone(42);
431433
sillyaddone
432434
-------------

‎src/pl/plpgsql/src/sql/plpgsql_record.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,12 @@ alter table mutable drop column f1;
274274
altertable mutable add column f1 float8;
275275

276276
-- currently, this fails due to cached plan for "r.f1 + 1" expression
277+
-- (but we can't actually show that, because a CLOBBER_CACHE_ALWAYS build
278+
-- will succeed)
277279
-- select sillyaddone(42);
278-
\c-
279-
-- but it's OK after a reconnect
280+
281+
-- but it's OK if we force plan rebuilding
282+
discard plans;
280283
select sillyaddone(42);
281284

282285
altertable mutable drop column f1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp