Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2023-07-24 15:48:06 +0000
committerAlvaro Herrera2023-07-24 15:48:06 +0000
commitd6677b93c79b19bf3772cb32fcea0a77d8520db9 (patch)
treedbd467a7fd09eb378e9989edfb7ebe3458f628b6 /contrib/test_decoding/sql
parent6061adedf53cbe0f94a52dd02465abf8c7c9fb43 (diff)
Make test_decoding ddl.out shorter
Some of the test_decoding test output was extremely wide, because it deals with massive toasted values, and the aligned mode causes psql to produce 200kB of whitespace and dashes. Change to unaligned mode temporarily to avoid that behavior. Backpatch to 14, where it applies cleanly. Discussion: https://postgr.es/m/20230405103953.sxleixp3uz5lazst@alvherre.pgsql
Diffstat (limited to 'contrib/test_decoding/sql')
-rw-r--r--contrib/test_decoding/sql/ddl.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 57285a828c7..2f8e4e7f2cc 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -414,7 +414,11 @@ UPDATE toasttable
SET toasted_col1 = (SELECT string_agg(g.i::text, '') FROM generate_series(1, 2000) g(i))
WHERE id = 1;
+-- This output is extremely wide, and using aligned mode causes psql to
+-- produce 200kB of useless dashes. Turn that off temporarily to avoid it.
+\pset format unaligned
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
+\pset format aligned
INSERT INTO toasttable(toasted_col1) SELECT string_agg(g.i::text, '') FROM generate_series(1, 2000) g(i);
@@ -426,10 +430,12 @@ WHERE id = 1;
-- make sure we decode correctly even if the toast table is gone
DROP TABLE toasttable;
+\pset format unaligned
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-- done, free logical replication slot
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
+\pset format aligned
SELECT pg_drop_replication_slot('regression_slot');