Skip to content

Commit

Permalink
Fix top query regression tests on PG 12,13
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
darkfronza committed Aug 26, 2024
1 parent ea76553 commit 43d5548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regression/expected/top_query_1.out
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 43d5548

Please sign in to comment.