From 20dd640b1e935fb35daaf65148e9e6104617cb3c Mon Sep 17 00:00:00 2001 From: Diego Fronza Date: Thu, 15 Aug 2024 16:45:23 -0300 Subject: [PATCH] fixup! Add query denormalization regression test for prepared statements --- regression/expected/denorm_prepared_statements.out | 6 +++--- regression/sql/denorm_prepared_statements.sql | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/regression/expected/denorm_prepared_statements.out b/regression/expected/denorm_prepared_statements.out index 7be03fa9..a4f18468 100644 --- a/regression/expected/denorm_prepared_statements.out +++ b/regression/expected/denorm_prepared_statements.out @@ -9,8 +9,8 @@ SELECT pg_stat_monitor_reset(); PREPARE prepstmt(TEXT, TEXT, TEXT) AS INSERT INTO t1(a, b, c) VALUES($1, $2, $3); EXECUTE prepstmt('A', 'B', 'C'); -SELECT query, calls FROM pg_stat_monitor ORDER BY query COLLATE "C"; - query | calls +SELECT SUBSTRING(query, 0, 128), calls FROM pg_stat_monitor ORDER BY query COLLATE "C"; + substring | calls --------------------------------------------------------------------------------+------- PREPARE prepstmt(TEXT, TEXT, TEXT) AS INSERT INTO t1(a, b, c) VALUES(A, B, C); | 1 SELECT pg_stat_monitor_reset() | 1 @@ -21,8 +21,8 @@ SELECT SUBSTRING(query, 0, 128), calls FROM pg_stat_monitor ORDER BY query COLLA substring | calls ---------------------------------------------------------------------------------------------------------------------------------+------- PREPARE prepstmt(TEXT, TEXT, TEXT) AS INSERT INTO t1(a, b, c) VALUES(XYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZX | 2 + SELECT SUBSTRING(query, 0, 128), calls FROM pg_stat_monitor ORDER BY query COLLATE "C" | 1 SELECT pg_stat_monitor_reset() | 1 - SELECT query, calls FROM pg_stat_monitor ORDER BY query COLLATE "C" | 1 (3 rows) DROP TABLE t1; diff --git a/regression/sql/denorm_prepared_statements.sql b/regression/sql/denorm_prepared_statements.sql index 8e7ce8cc..94c69353 100644 --- a/regression/sql/denorm_prepared_statements.sql +++ b/regression/sql/denorm_prepared_statements.sql @@ -8,7 +8,7 @@ SELECT pg_stat_monitor_reset(); PREPARE prepstmt(TEXT, TEXT, TEXT) AS INSERT INTO t1(a, b, c) VALUES($1, $2, $3); EXECUTE prepstmt('A', 'B', 'C'); -SELECT query, calls FROM pg_stat_monitor ORDER BY query COLLATE "C"; +SELECT SUBSTRING(query, 0, 128), calls FROM pg_stat_monitor ORDER BY query COLLATE "C"; EXECUTE prepstmt(REPEAT('XYZ', 8192), md5(random()::text), REPEAT('RANDOM', 4096)); SELECT SUBSTRING(query, 0, 128), calls FROM pg_stat_monitor ORDER BY query COLLATE "C";