pg_dump test: Make concatenated create_sql commands more readable

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dump test: Make concatenated create_sql commands more readable
Date: 2022-10-22 10:41:03
Message-ID: d6aec95a-8729-43cc-2578-f2a5e46640e0@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When the pg_dump 002_pg_dump.pl test generates the command to load the
schema, it does

# Add terminating semicolon
$create_sql{$test_db} .= $tests{$test}->{create_sql} . ";";

In some cases, this creates a duplicate semicolon, but more importantly,
this doesn't add any newline. So if you look at the result in either
the server log or in tmp_check/log/regress_log_002_pg_dump, it looks
like a complete mess. The attached patch makes the output look cleaner
for manual inspection: add semicolon only if necessary, and add two
newlines.

Attachment Content-Type Size
0001-pg_dump-test-Make-concatenated-create_sql-commands-m.patch text/plain 981 bytes

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-10-22 10:57:50 Re: Logical WAL sender unresponsive during decoding commit
Previous Message Michael Paquier 2022-10-22 09:42:02 Re: Avoid memory leaks during base backups