public inbox for [email protected]
help / color / mirror / Atom feedFrom: Chao Li <[email protected]>
To: Kirill Reshke <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Cleanup explain_memoize function after test
Date: Wed, 22 Apr 2026 17:24:33 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALdSSPij9tx019ZzR+VVj7cEEd7HL4-SPiu+YKx66n9-rVPkUg@mail.gmail.com>
References: <CALdSSPij9tx019ZzR+VVj7cEEd7HL4-SPiu+YKx66n9-rVPkUg@mail.gmail.com>
> On Apr 22, 2026, at 14:49, Kirill Reshke <[email protected]> wrote:
>
> Hi!
>
> I was doing some hacking today, when I noticed that the memoize
> regression test does not clean up the explain_memoize function after
> its end. I checked other regression tests and they tend to do it. So,
> I am not sure if there is a rule about `you should drop all objects
> that you create in regression test`, but if there is such a rule, PFA.
>
>
>
> --
> Best regards,
> Kirill Reshke
> <v1-0001-Cleanup-explain_memoize-after-resgression-test.patch>
Good catch.
You also need to update the corresponding out file, otherwise the test will fail. I have helped update the out file in v2, now “make check” passes with v2 applied.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
Attachments:
[application/octet-stream] v2-0001-Cleanup-explain_memoize-after-resgression-test.patch (1.2K, 2-v2-0001-Cleanup-explain_memoize-after-resgression-test.patch)
download | inline diff:
From 695443e50e522453f11c442fef6f025e29a0a2e3 Mon Sep 17 00:00:00 2001
From: reshke <[email protected]>
Date: Wed, 22 Apr 2026 06:46:25 +0000
Subject: [PATCH v2] Cleanup explain_memoize after resgression test
---
src/test/regress/expected/memoize.out | 1 +
src/test/regress/sql/memoize.sql | 2 ++
2 files changed, 3 insertions(+)
diff --git a/src/test/regress/expected/memoize.out b/src/test/regress/expected/memoize.out
index 218972dfab8..199ef15920a 100644
--- a/src/test/regress/expected/memoize.out
+++ b/src/test/regress/expected/memoize.out
@@ -561,4 +561,5 @@ SELECT * FROM tab_anti t1 WHERE t1.a IN
-> Seq Scan on tab_anti t3
(10 rows)
+DROP FUNCTION explain_memoize;
DROP TABLE tab_anti;
diff --git a/src/test/regress/sql/memoize.sql b/src/test/regress/sql/memoize.sql
index e39bbb65391..4774d20c624 100644
--- a/src/test/regress/sql/memoize.sql
+++ b/src/test/regress/sql/memoize.sql
@@ -272,4 +272,6 @@ SELECT * FROM tab_anti t1 WHERE t1.a IN
(SELECT a FROM tab_anti t2 WHERE t2.b IN
(SELECT t1.b FROM tab_anti t3 WHERE t2.a > 1 OFFSET 0));
+DROP FUNCTION explain_memoize;
+
DROP TABLE tab_anti;
--
2.50.1 (Apple Git-155)
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Cleanup explain_memoize function after test
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox