From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Eudald ValcĂ rcel Lacasa <eudald.valcarcel@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_dump negation regex
Date: Thu, 7 May 2020 10:36:38 -0700
Message-ID: <3e1c0334-dcbf-54d1-1d51-939acf1d826d@aklaver.com> (raw)
In-Reply-To: <CANEx+AVHLyV5s0zw-KJCkeKoO-EesHk-+BN_=RkJ=rgSFCmZKg@mail.gmail.com>
References: <CANEx+AVHLyV5s0zw-KJCkeKoO-EesHk-+BN_=RkJ=rgSFCmZKg@mail.gmail.com>
On 5/7/20 9:53 AM, Eudald ValcĂ rcel Lacasa wrote:
> Hello!
> I've been looking at the documentation and there seems to be no keyword
> for negation purposes.
>
> Am I missing something? Or it's like this?
https://www.postgresql.org/docs/12/app-pgdump.html
-T pattern
--exclude-table=pattern
Do not dump any tables matching pattern. The pattern is interpreted
according to the same rules as for -t. -T can be given more than once to
exclude tables matching any of several patterns.
When both -t and -T are given, the behavior is to dump just the
tables that match at least one -t switch but no -T switches. If -T
appears without -t, then tables matching -T are excluded from what is
otherwise a normal dump.
For what patterns you can use see:
https://www.postgresql.org/docs/12/app-psql.html#APP-PSQL-PATTERNS>
> I'm trying to use pg_dump to create a database skeleton and I have
> tables like program_0, program_1, etc. And I'd like to dump all the
> tables but client_1 onwards.
>
> Does anybody happen to know a way to accomplish it?
>
> Thank you!
> Eudald
--
Adrian Klaver
adrian.klaver@aklaver.com
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-general@postgresql.org
Cc: adrian.klaver@aklaver.com, eudald.valcarcel@gmail.com
Subject: Re: pg_dump negation regex
In-Reply-To: <3e1c0334-dcbf-54d1-1d51-939acf1d826d@aklaver.com>
References: <CANEx+AVHLyV5s0zw-KJCkeKoO-EesHk-+BN_=RkJ=rgSFCmZKg@mail.gmail.com> <3e1c0334-dcbf-54d1-1d51-939acf1d826d@aklaver.com>
* 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