Re: Non-text mode for pg_dumpall

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Non-text mode for pg_dumpall
Date: 2025-01-11 15:59:37
Message-ID: CACJufxGcZ1rK94cgfdc9McCD7W-83PT9_cx5VoFeC-HVc10Wzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.
the following two tests, you can add to src/bin/pg_dump/t/001_basic.pl

command_fails_like(
[ 'pg_restore', '--globals-only', '-f', 'xxx' ],
qr/\Qpg_restore: error: option -g\/--globals-only requires option
-d\/--dbname\E/,
'pg_restore: error: option -g/--globals-only requires option -d/--dbname'
);
command_fails_like(
[ 'pg_restore', '--globals-only', '--file=xxx', '--exclude-database=x',],
qr/\Qpg_restore: error: option --exclude-database cannot be used
together with -g\/--globals-only\E/,
'pg_restore: error: option --exclude-database cannot be used
together with -g/--globals-only'
);

in pg_restore.sgml.
<varlistentry>
<term><option>--exclude-database=<replaceable
class="parameter">pattern</replaceable></option></term>
<listitem>
the position should right after
<varlistentry>
<term><option>-d <replaceable
class="parameter">dbname</replaceable></option></term>
<term><option>--dbname=<replaceable
class="parameter">dbname</replaceable></option></term>

should
pg_restore --globals-only
pg_restore --exclude-database=pattern
be in a separate patch?

i am also wondering what will happen:
pg_restore --exclude-database=pattern --dbname=pattern

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mahendra Singh Thalor 2025-01-11 16:08:12 Re: Non-text mode for pg_dumpall
Previous Message Tom Lane 2025-01-11 15:42:34 Re: Missing quotes when deparsing XMLTABLE() and SQL/JSON query functions