Skip to content

Commit 179c463

Browse files
committed
pg_stat_statements: Remove duplicated tests for SET statements
This looks like a copy-paste mistake introduced in de2aca2, that has added checks for more patterns of SET statements while ignoring the original test block that existed. Backpatch down to where this has been introduced, as this shaves some cycles. Author: Sergei Kornilov Discussion: https://postgr.es/m/5689421699428803@mail-sendbernar-production-main-46.myt.yp-c.yandex.net Backpatch-through: 16
1 parent 42f8326 commit 179c463

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

contrib/pg_stat_statements/expected/utility.out

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -533,30 +533,3 @@ SELECT pg_stat_statements_reset();
533533

534534
(1 row)
535535

536-
-- SET statements.
537-
-- These use two different strings, still they count as one entry.
538-
SET work_mem = '1MB';
539-
Set work_mem = '1MB';
540-
SET work_mem = '2MB';
541-
RESET work_mem;
542-
SET enable_seqscan = off;
543-
SET enable_seqscan = on;
544-
RESET enable_seqscan;
545-
SELECT calls, rows, query FROM pg_stat_statements ORDER BY query COLLATE "C";
546-
calls | rows | query
547-
-------+------+-----------------------------------
548-
1 | 0 | RESET enable_seqscan
549-
1 | 0 | RESET work_mem
550-
1 | 1 | SELECT pg_stat_statements_reset()
551-
1 | 0 | SET enable_seqscan = off
552-
1 | 0 | SET enable_seqscan = on
553-
2 | 0 | SET work_mem = '1MB'
554-
1 | 0 | SET work_mem = '2MB'
555-
(7 rows)
556-
557-
SELECT pg_stat_statements_reset();
558-
pg_stat_statements_reset
559-
--------------------------
560-
561-
(1 row)
562-

contrib/pg_stat_statements/sql/utility.sql

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,3 @@ DROP TABLE pgss_ctas;
264264
DROP TABLE pgss_select_into;
265265

266266
SELECT pg_stat_statements_reset();
267-
268-
-- SET statements.
269-
-- These use two different strings, still they count as one entry.
270-
SET work_mem = '1MB';
271-
Set work_mem = '1MB';
272-
SET work_mem = '2MB';
273-
RESET work_mem;
274-
SET enable_seqscan = off;
275-
SET enable_seqscan = on;
276-
RESET enable_seqscan;
277-
278-
SELECT calls, rows, query FROM pg_stat_statements ORDER BY query COLLATE "C";
279-
SELECT pg_stat_statements_reset();

0 commit comments

Comments
 (0)