From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_dump test: Make concatenated create_sql commands more readabl
Date: Mon, 31 Oct 2022 13:30:05 +0000
Message-ID: <E1opUrc-001bj9-Ja@gemulon.postgresql.org> (raw)
pg_dump test: Make concatenated create_sql commands more readable
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.
This patch makes the output look cleaner for manual inspection: add
semicolon only if necessary, and add two newlines.
Discussion: https://www.postgresql.org/message-id/flat/d6aec95a-8729-43cc-2578-f2a5e46640e0%40enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6e10631d1e6e350ba3f82b0bd3a29678f9f5badd
Modified Files
--------------
src/bin/pg_dump/t/002_pg_dump.pl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: pg_dump test: Make concatenated create_sql commands more readabl
In-Reply-To: <E1opUrc-001bj9-Ja@gemulon.postgresql.org>
References: <E1opUrc-001bj9-Ja@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox