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 1kcZx8-0001qs-RZ for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Nov 2020 20:09:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcZx4-0002hI-Vh for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Nov 2020 20:09:14 +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 1kcZx4-0002hB-OR for pgsql-hackers@lists.postgresql.org; Tue, 10 Nov 2020 20:09:14 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcZwx-0001ET-RU for pgsql-hackers@postgresql.org; Tue, 10 Nov 2020 20:09:14 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 6B05A5F7A2; Tue, 10 Nov 2020 15:09:04 -0500 (EST) Date: Tue, 10 Nov 2020 15:09:04 -0500 From: Stephen Frost To: Pavel Stehule Cc: Surafel Temesgen , Tom Lane , Alvaro Herrera , vignesh C , Justin Pryzby , PostgreSQL Hackers , Daniel Gustafsson Subject: Re: proposal: possibility to read dumped table's name from file Message-ID: <20201110200904.GU16415@tamriel.snowman.net> References: <20200903200842.GA11952@alvherre.pgsql> <832697.1599178532@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mYHBEULg1qMfneBr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --mYHBEULg1qMfneBr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Pavel Stehule (pavel.stehule@gmail.com) wrote: > rebase + minor change - using pg_get_line_buf instead pg_get_line_append I started looking at this and went back through the thread and while I tend to agree that JSON may not be a good choice for this, it's not the only possible alternative. There is no doubt that pg_dump is already a sophisticated data export tool, and likely to continue to gain new features, such that having a configuration file for it would be very handy, but this clearly isn't really going in a direction that would allow for that. Perhaps this feature could co-exist with a full blown configuration for pg_dump, but even then there's certainly issues with what's proposed- how would you handle explicitly asking for a table which is named=20 " mytable" to be included or excluded? Or a table which has a newline in it? Using a standardized format which supports the full range of what we do in a table name, explicitly and clearly, would address these issues and also give us the flexibility to extend the options which could be used through the configuration file beyond just the filters in the future. Unlike for the pg_basebackup manifest, which we generate and read entirely programatically, a config file for pg_dump would almost certainly be updated manually (or, at least, parts of it would be and perhaps other parts generated), which means it'd really be ideal to have a proper way to support comments in it (something that the proposed format also doesn't really get right- # must be the *first* character, and you can only have whole-line comments..?), avoid extra unneeded punctuation (or, at times, allow it- such as trailing commas in lists), cleanly handle multi-line strings (consider the oft discussed idea around having pg_dump support a WHERE clause for exporting data from tables...), etc. Overall, -1 from me on this approach. Maybe it could be fixed up to handle all the different names of objects that we support today (something which, imv, is really a clear requirement for this feature to be committed), but I suspect you'd end up half-way to yet another configuration format when we could be working to support something like TOML or maybe YAML... but if you want my 2c, TOML seems closer to what we do for postgresql.conf and getting that over to something that's standardized, while a crazy long shot, is a general nice idea, imv. Thanks, Stephen --mYHBEULg1qMfneBr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJfqvNfAAoJEO1sijiDR2RVutMP/RllKPstiBsuaOA7VE0bd804 AT7JFq7ex6x3FwaB5OnXBujg64zbhF0vVeEylRwvQIdwXgZ9nm8VaD4nES77rKq2 EMfXBPWN5SDx0w9iJKIgIIsI5b02ZieTLVpsq+iwAdqoE+rN5L5/rJvDoeVWOWTN I2O/M+gY76xNNA/v3nr8t8Q1wEi0fFpZyW2ByzuS8EDs40yQ+3B9OV2MGqN7tMUt fGh3VfIL5vesTPYgttZPm6bApE43HFVQn4ELs1rStSMIZq30xyUMT0vwIeGcns9S 6bmcO8QKU+lUL62XRki28OQzVUDOXo78u4JnY7zz21qI/8enM4Vus/+3w21zMoKl i8bHS0HoDqaaasRX2blODY2mAe4NjhDlPrL0oG7YV/mSJpTNPmdG+btGFThWIyGe OS4oNSSCFrran+b41aQZqdPFbTUqZ9KiRbJHi+JVURzRN0rjC7BwHSEhte7SJWBR bOwQFEsfuby84zF4VYcpgsg112tSciElH5J/XxyL60MlvOiafCCJpgOPJSSkqRfq r4l77H8c/+aJ+/PuPxii0xCfaVOe9JxwzAaIJ06/95aPx/IjjAmJ730kl53oQ56F WIH45D6MFW57nY53P8otaWB+0VxeHwePzbmrgZCazmsXOb37ikeFtqNTWnE1cqZ/ WBLOL3vFx0ZVfCb/XOzb =8rYs -----END PGP SIGNATURE----- --mYHBEULg1qMfneBr--