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 1m3Ie4-0007E6-0Y for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jul 2021 13:40:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3Ie2-0002K1-Mu for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jul 2021 13:40:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3Ie2-0002Jr-Ef for pgsql-hackers@lists.postgresql.org; Tue, 13 Jul 2021 13:40:18 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3Ie0-00079c-07 for pgsql-hackers@postgresql.org; Tue, 13 Jul 2021 13:40:18 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A69285F7A2; Tue, 13 Jul 2021 09:40:13 -0400 (EDT) Date: Tue, 13 Jul 2021 09:40:13 -0400 From: Stephen Frost To: Tom Lane Cc: Alvaro Herrera , Tomas Vondra , Daniel Gustafsson , Pavel Stehule , Justin Pryzby , Dean Rasheed , Surafel Temesgen , vignesh C , PostgreSQL Hackers Subject: Re: proposal: possibility to read dumped table's name from file Message-ID: <20210713134013.GF20766@tamriel.snowman.net> References: <202107122259.n6o5uwb5erza@alvherre.pgsql> <3183720.1626131795@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YgnnPIK7sZrxKB1I" Content-Disposition: inline In-Reply-To: <3183720.1626131795@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YgnnPIK7sZrxKB1I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Alvaro Herrera writes: > > [1] your proposal of "[+-] OBJTYPE OBJIDENT" plus empty lines allowed > > plus lines starting with # are comments, seems plenty. Any line not > > following that format would cause an error to be thrown. >=20 > I'd like to see some kind of keyword on each line, so that we could extend > the command set by adding new keywords. As this stands, I fear we'd end > up using random punctuation characters in place of [+-], which seems > pretty horrid from a readability standpoint. I agree that it'd end up being bad with single characters. > I think that this file format should be designed with an eye to allowing > every, or at least most, pg_dump options to be written in the file rather > than on the command line. I don't say we have to *implement* that right > now; but if the format spec is incapable of being extended to meet > requests like that one, I think we'll regret it. This line of thought > suggests that the initial commands ought to match the existing > include/exclude switches, at least approximately. I agree that we want to have an actual config file that allows just about every pg_dump option. I'm also fine with saying that we don't have to implement that initially but the format should be one which can be extended to allow that. > Hence I suggest >=20 > include table PATTERN > exclude table PATTERN >=20 > which ends up being the above but with words not [+-]. Which ends up inventing yet-another-file-format which people will end up writing generators and parsers for. Which is exactly what I was arguing we really should be trying to avoid doing. I definitely feel that we should have a way to allow anything that can be created as an object in the database to be explicitly included in the file and that means whatever we do need to be able to handle objects that have names that span multiple lines, etc. It's not clear how the above would. As I recall, the proposed patch didn't have anything for handling that, which was one of the issues I had with it and is why I bring it up again. Thanks, Stephen --YgnnPIK7sZrxKB1I Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJg7Ze9AAoJEO1sijiDR2RVkUoP/RKb2VfnJE7ix2dOE1X7Qzz2 /3k8IDGVgL0xeMM2JEzsNSbTAN3R6LBi4aHNic9vpp+EW0NcSofkBz8i4xG458FX pOOw1ANlCblNUZmFmDGtY0LAPs1Dn8RQxUnLdFkmBtXObjyW1s9x/R3l9pBIrR6a mmDKSpSbIZsw51CcWuIrNqzqgoMSv3rNeNbZS4oE5CxfiX3bwJPwpkh0tfWujg/P ldzsql0EnKnMe4X3XsPZGAxyECzbZiPLzDQvMoprfc04Edxl2+2fEC5KhsWrGWkv oCUXsrOXKKSfK8IZylrqG8UiFX5ehY7ve4JbTr082uELNmsnlYCmbNX73EVA/3/x Gz0itVhjRiGEe41i7dPwiuvhJ5kFmLy1JFqv227/6LtqU0fIIDMFKAHny4pmHH6q qMu12DJb4NXk0FYwx76O7O3or7kzPrtN2KU/zw4A3PlPYIF6xCq6a8WtgWGiBSpC dJPWATgQfXSIBVZzKnTqd6mAhKwGovthYO8fsC9cbpEW/dooiEz1EUt4BjUsDaAA NRG9Y+EITyqXcNukOFUjshC+r46Srbt68f+MZLLgxUqahjF5xt0/MCvsOcvT7Cjt iv4JQmqG/lApOBgLd0oOvWpaxr9n02K+hFwnm4xbOSMZunza2blfbZGRZAyAcukh ypGNAwKhtVd+ZKfhNayY =Jq1i -----END PGP SIGNATURE----- --YgnnPIK7sZrxKB1I--