From 43d5548f30d14d52d1c2f18029b249a6601d87bf Mon Sep 17 00:00:00 2001 From: Diego Fronza Date: Mon, 19 Aug 2024 16:45:03 -0300 Subject: [PATCH] Fix top query regression tests on PG 12,13 On PG 12, 13, the internal return instruction in the following function: ``` CREATE OR REPLACE FUNCTION add(int, int) RETURNS INTEGER AS $$ BEGIN return (select $1 + $2); END; $$ language plpgsql; ``` Is stored as SELECT (select expr1 + expr2) On PG 14 onward it's stored just as SELECT (expr1 + expr2) --- regression/expected/top_query_1.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression/expected/top_query_1.out b/regression/expected/top_query_1.out index de7df829..bcf52030 100644 --- a/regression/expected/top_query_1.out +++ b/regression/expected/top_query_1.out @@ -37,7 +37,7 @@ SELECT query, top_query FROM pg_stat_monitor ORDER BY query COLLATE "C"; return add($1,$2); +| END; +| $$ language plpgsql | - SELECT (select $1 + $2) | SELECT add2(1,2); + SELECT (select NULL + NULL) | SELECT add2(1,2); SELECT add2(1,2) | SELECT pg_stat_monitor_reset() | (5 rows)