pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Extensions not dumped when --schema is used
Date: Sat, 20 Feb 2021 11:31:40 -0500
Message-ID: <3197673.1613838700@sss.pgh.pa.us> (raw)
In-Reply-To: <YDD/yYXamLvZn3/w@paquier.xyz>
References: <CAECtzeXOt4cnMU5+XMZzxBPJ_wu76pNy6HZKPRBL-j7yj1E4+g@mail.gmail.com>
	<000780DC-6E7E-46D7-AE5A-E56405AC9204@yesql.se>
	<CAECtzeVD7ktWWE=23pb5o4kNbEEjQZJ5w+skEmM0yoW7NtfSqg@mail.gmail.com>
	<24787.1589985558@sss.pgh.pa.us>
	<CAECtzeUEBSMGbmeHmyHeHJKPUVMHWu7W5TKkan7A76LkEMF=pQ@mail.gmail.com>
	<CAECtzeVNstzUb6ft8=dmtV5XUQ-PdLWriG4yVqpgeVM0Qo0e4g@mail.gmail.com>
	<CAOBaU_b2sP_eAUuWgq3k9tDmPCeNQy-YpPCwrAa24nyBgnZzDw@mail.gmail.com>
	<CAECtzeVAVSZp5b95tUwZk4vsSDX6WnpmuZEunMsa--soOQ4D6w@mail.gmail.com>
	<CAECtzeXHcvz7HWv0CNQ3u5nA7ZWsc8hj3ZsE1sSOh-pKVPagEg@mail.gmail.com>
	<CAECtzeV9+TnuKYrj8XUBmRAhVu9ftyiM6-BKVUS1L6=r=zFCng@mail.gmail.com>
	<YDD/yYXamLvZn3/w@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> As presented in this patch, specifying both --extension and
> --table/--schema means that pg_dump will dump both tables and
> extensions matching the pattern passed down.  But shouldn't extensions
> not be dumped if --table or --schema is used?  Combining --schema with
> --table implies that the schema part is ignored, for instance.

I haven't read the patch, but the behavior I would expect is:

1. If --extension=pattern is given, then extensions matching the
pattern are included in the dump, regardless of other switches.
(Conversely, use of --extension doesn't affect choices about what
other objects are dumped.)

2. Without --extension, the behavior is backward compatible,
ie, dump extensions in an include_everything dump but not
otherwise.

Maybe we could have a separate discussion as to which switches turn
off include_everything, but that seems independent of this patch.

			regards, tom lane





view thread (38+ messages)  latest in thread

Message-ID: <3197673.1613838700@sss.pgh.pa.us>
Permalink:  ../3197673.1613838700@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3197673.1613838700@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, guillaume@lelarge.info, rjuju123@gmail.com, daniel@yesql.se
  Subject: Re: Extensions not dumped when --schema is used
  In-Reply-To: <3197673.1613838700@sss.pgh.pa.us>
  References: <CAECtzeXOt4cnMU5+XMZzxBPJ_wu76pNy6HZKPRBL-j7yj1E4+g@mail.gmail.com> <000780DC-6E7E-46D7-AE5A-E56405AC9204@yesql.se> <CAECtzeVD7ktWWE=23pb5o4kNbEEjQZJ5w+skEmM0yoW7NtfSqg@mail.gmail.com> <24787.1589985558@sss.pgh.pa.us> <CAECtzeUEBSMGbmeHmyHeHJKPUVMHWu7W5TKkan7A76LkEMF=pQ@mail.gmail.com> <CAECtzeVNstzUb6ft8=dmtV5XUQ-PdLWriG4yVqpgeVM0Qo0e4g@mail.gmail.com> <CAOBaU_b2sP_eAUuWgq3k9tDmPCeNQy-YpPCwrAa24nyBgnZzDw@mail.gmail.com> <CAECtzeVAVSZp5b95tUwZk4vsSDX6WnpmuZEunMsa--soOQ4D6w@mail.gmail.com> <CAECtzeXHcvz7HWv0CNQ3u5nA7ZWsc8hj3ZsE1sSOh-pKVPagEg@mail.gmail.com> <CAECtzeV9+TnuKYrj8XUBmRAhVu9ftyiM6-BKVUS1L6=r=zFCng@mail.gmail.com> <YDD/yYXamLvZn3/w@paquier.xyz> <3197673.1613838700@sss.pgh.pa.us>

* 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