Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDVAe-0005hJ-86 for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Feb 2021 16:31:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lDVAc-0002uN-S2 for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Feb 2021 16:31:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDVAc-0002uG-LW for pgsql-hackers@lists.postgresql.org; Sat, 20 Feb 2021 16:31:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDVAW-0006PK-EH for pgsql-hackers@lists.postgresql.org; Sat, 20 Feb 2021 16:31:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 11KGVe963197674; Sat, 20 Feb 2021 11:31:40 -0500 From: Tom Lane To: Michael Paquier cc: Guillaume Lelarge , Julien Rouhaud , Daniel Gustafsson , PostgreSQL Hackers Subject: Re: Extensions not dumped when --schema is used In-reply-to: References: <000780DC-6E7E-46D7-AE5A-E56405AC9204@yesql.se> <24787.1589985558@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Sat, 20 Feb 2021 21:25:45 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3197672.1613838700.1@sss.pgh.pa.us> Date: Sat, 20 Feb 2021 11:31:40 -0500 Message-ID: <3197673.1613838700@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier 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