about help message for new pg_dump's --filter option
Hello.
Recently, a new --filter option was added to pg_dump. I might be
wrong, but the syntax of the help message for this feels off. Is the
word 'on' not necessary after 'based'?
--filter=FILENAME include or exclude objects and data from dump
based expressions in FILENAME
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
At Thu, 30 Nov 2023 10:20:40 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in
Hello.
Recently, a new --filter option was added to pg_dump. I might be
wrong, but the syntax of the help message for this feels off. Is the
word 'on' not necessary after 'based'?--filter=FILENAME include or exclude objects and data from dump
based expressions in FILENAME
Hmm. A similar message is spelled as "based on expression". Thus, the
attached correct this message in this line.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachments:
fix_pg_dump_message.difftext/x-patch; charset=us-asciiDownload
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 57c6836b88..eea320b731 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -1119,7 +1119,7 @@ help(const char *progname)
" including child and partition tables\n"));
printf(_(" --extra-float-digits=NUM override default setting for extra_float_digits\n"));
printf(_(" --filter=FILENAME include or exclude objects and data from dump\n"
- " based expressions in FILENAME\n"));
+ " based on expressions in FILENAME\n"));
printf(_(" --if-exists use IF EXISTS when dropping objects\n"));
printf(_(" --include-foreign-data=PATTERN\n"
" include data of foreign tables on foreign\n"
On 30 Nov 2023, at 02:52, Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:
At Thu, 30 Nov 2023 10:20:40 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in
Hello.
Recently, a new --filter option was added to pg_dump. I might be
wrong, but the syntax of the help message for this feels off. Is the
word 'on' not necessary after 'based'?--filter=FILENAME include or exclude objects and data from dump
based expressions in FILENAMEHmm. A similar message is spelled as "based on expression". Thus, the
attached correct this message in this line.
Right, that's an unfortunate miss, it should've been "based on expression" like
you propose. Fixed.
--
Daniel Gustafsson
On 2023-Nov-30, Kyotaro Horiguchi wrote:
Hello.
Recently, a new --filter option was added to pg_dump. I might be
wrong, but the syntax of the help message for this feels off. Is the
word 'on' not necessary after 'based'?--filter=FILENAME include or exclude objects and data from dump
based expressions in FILENAME
Isn't this a bit too long? Maybe we can do something shorter, like
--filter=FILENAME determine objects in dump based on FILENAME
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Those who use electric razors are infidels destined to burn in hell while
we drink from rivers of beer, download free vids and mingle with naked
well shaved babes." (http://slashdot.org/comments.pl?sid=44793&cid=4647152)
On 2 Dec 2023, at 17:02, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
On 2023-Nov-30, Kyotaro Horiguchi wrote:
Hello.
Recently, a new --filter option was added to pg_dump. I might be
wrong, but the syntax of the help message for this feels off. Is the
word 'on' not necessary after 'based'?--filter=FILENAME include or exclude objects and data from dump
based expressions in FILENAMEIsn't this a bit too long?
I was trying to come up with a shorter description but didn't come up with one
that clearly enough described what it does.
Maybe we can do something shorter, like
--filter=FILENAME determine objects in dump based on FILENAME
I don't think that's an improvement really, it's not obvious what "determine
objects" means. How about a variation along these lines?:
--filter=FILENAME include/exclude objects based on rules in FILENAME
If we want to use less horizontal space we can replace FILENAME with FILE,
though I'd prefer not to since FILENAME is already used in the help output for
--file setting a precedent.
--
Daniel Gustafsson