pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ROCHER Julien <julien.rocher@emeria.eu>
To: Julien Rouhaud <rjuju123@gmail.com>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: TR: Issue: --exclude-schema flag not working with pgrestore
Date: Sun, 5 Feb 2023 15:52:49 +0000
Message-ID: <PR0P264MB04927B42E2CDD12982180587EDD59@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <PR0P264MB04922ED5F0FAEDC514754FD1EDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM>
References: <PR0P264MB04922339584F1611C4775B8CEDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM>
	<PR0P264MB049277C2C09E857806770496EDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM>
	<20230111094026.6jajog43mb42rwvv@jrouhaud>
	<PR0P264MB049299A7F602E011C9B0B899EDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM>
	<20230111132745.ixeqtykgvcpfoxhc@jrouhaud>
	<PR0P264MB04922ED5F0FAEDC514754FD1EDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM>

Hi again,

I was wondering though, do you know why it is different from pgdump  -N behavior (Do not dump any schemas matching pattern) ?


Julien ROCHER
Développeur Team Data - Migration

Emeria Technologies
76-78 Avenue des Champs Elysées – 75008 Paris
06 17 17 60 64
julien.rocher@emeria.eu<mailto:julien.rocher@emeria.eu>


De : ROCHER Julien <julien.rocher@emeria.eu>
Date : mercredi, 11 janvier 2023 à 15:16
À : Julien Rouhaud <rjuju123@gmail.com>
Objet : Re: TR: Issue: --exclude-schema flag not working with pgrestore
Ok thank you for you feedback

Julien ROCHER
Développeur Team Data - Migration

Emeria Technologies
76-78 Avenue des Champs Elysées – 75008 Paris
06 17 17 60 64
julien.rocher@emeria.eu<mailto:julien.rocher@emeria.eu>








De : Julien Rouhaud <rjuju123@gmail.com>
Date : mercredi, 11 janvier 2023 à 14:27
À : ROCHER Julien <julien.rocher@emeria.eu>
Objet : Re: TR: Issue: --exclude-schema flag not working with pgrestore
On Wed, Jan 11, 2023 at 10:43:10AM +0000, ROCHER Julien wrote:
>
> Indeed this partially solved the problem. However, although it doesn’t try to
> restore the “country.number" table, it still tries to create the “country”
> schema. Do you think it’s wanted ?

Yes that's the wanted behavior.  Per documentation:

 -N schema / --exclude-schema=schema
    Do not restore objects that are in the named schema

So it filters objects **in** the schema but not the schema itself.

If you want to also ignore the CREATE SCHEMA order, or some fancier behavior,
you need to use the --list / --use-list and cherry pick the parts you want to
keep or discard.

view thread (3+ messages)

Message-ID: <PR0P264MB04927B42E2CDD12982180587EDD59@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM>
Permalink:  ../PR0P264MB04927B42E2CDD12982180587EDD59@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/PR0P264MB04927B42E2CDD12982180587EDD59@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM

 · 

reply

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-bugs@postgresql.org
  Cc: julien.rocher@emeria.eu, rjuju123@gmail.com
  Subject: Re: TR: Issue: --exclude-schema flag not working with pgrestore
  In-Reply-To: <PR0P264MB04927B42E2CDD12982180587EDD59@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM>
  References: <PR0P264MB04922339584F1611C4775B8CEDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM> <PR0P264MB049277C2C09E857806770496EDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM> <20230111094026.6jajog43mb42rwvv@jrouhaud> <PR0P264MB049299A7F602E011C9B0B899EDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM> <20230111132745.ixeqtykgvcpfoxhc@jrouhaud> <PR0P264MB04922ED5F0FAEDC514754FD1EDFC9@PR0P264MB0492.FRAP264.PROD.OUTLOOK.COM> <PR0P264MB04927B42E2CDD12982180587EDD59@PR0P264MB0492.FRAP264.PROD.OUTLOOK.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