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 1kI1Kp-0006Kp-Gx for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2020 03:08:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kI1Ko-0007Ij-DW for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2020 03:08:46 +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 1kI1Ko-0007HV-6a for pgsql-hackers@lists.postgresql.org; Tue, 15 Sep 2020 03:08:46 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kI1Kl-0004CN-Tr for pgsql-hackers@lists.postgresql.org; Tue, 15 Sep 2020 03:08:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 23B6CE2F; Mon, 14 Sep 2020 23:08:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 14 Sep 2020 23:08:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=gyGtS5KxHLgiMwWuJxjAtwwHHl+ IXLFzHR5n+5VyW8U=; b=FBEbPjuNAgZiL2rYRtK8QECIUDOommjoxGbuaBQzKpm Oy9VaTiDGwXq/aYw+WWkpD0CqoQwHTY+/vKmx9BiujLZV7B+nsQmuTKfZLkbXlo+ m+BHt2sIrbZ2zcWWZ4kHRapNhpZZ5Hc1skAOwPGBHMWnvBXqEs3/d6VB8vvUmiwD pGReTQtT6Rz59EC1o4NMxN8tMErXH2gnFAVSDnIDgaEM3/lMardXR2+AL/aPdpti +Uz32+5ysg/DD/CzyYT2gy/ljUanBMLXiESX4DRGO2vwzqrxXxRQJx20+R8+Uhwp y/ljhiFPWE9Jumodt+A/qv6WhBZgBtnUojFTKvoGIpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=gyGtS5 KxHLgiMwWuJxjAtwwHHl+IXLFzHR5n+5VyW8U=; b=UcFDfb9GD2tkUf8oOu8xYs P34Cfi1BUTQIAZaAN8wy/FYoEq5pZMTab0clnGY9zaqNVfk/gzcjbYZIkKuKBDE1 Ck8A0FLTrjr5ceg3v73Wqa12cfp4sHRFA/HVaBJaq76Qm/MlwNcEXAquOBz1Mryx qqz4FKkocmfAJIaiGQuDUK3tL5dpbvrd5C27z8Iq8L0+w/1EXUIk4hhvXAiWRaVc 8JvoOfZBB1HZ9UPS8uO/zfQq6NNhJcgS1Es75BqppHsde8zi/CKztnf1NLNfhkxS RwSBUPuegx7Na+/KPJjC3nYj2tdvEbuns5UMk1E2HzNCAYQmU8SQxOB2THYJx8hQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeijedgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 069DE306467D; Mon, 14 Sep 2020 23:08:38 -0400 (EDT) Date: Tue, 15 Sep 2020 12:08:34 +0900 From: Michael Paquier To: Tom Lane Cc: Julien Rouhaud , Justin Pryzby , PostgreSQL Hackers Subject: Re: Avoid useless retrieval of defaults and check constraints in pg_dump -a Message-ID: <20200915030834.GL2183@paquier.xyz> References: <20200712054850.GA92357@nol> <20200712142921.GA26220@telsasoft.com> <20200915023320.GI2183@paquier.xyz> <1234545.1600138561@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sCNd3Ivk/oijKKf1" Content-Disposition: inline In-Reply-To: <1234545.1600138561@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --sCNd3Ivk/oijKKf1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Sep 14, 2020 at 10:56:01PM -0400, Tom Lane wrote: > (Note that we disallow sub-queries in CHECK constraints, and also > disclaim responsibility for what happens if you cheat by hiding > the subquery in a function. So while it's certainly possible to > build CHECK constraints that only work if table X is loaded before > table Y, pg_dump already doesn't guarantee that'll work, --data-only > or otherwise.) Yep, exactly what I was thinking upthread by cheating with a schema having cross-table references in a check constraint. -- Michael --sCNd3Ivk/oijKKf1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl9gMDIACgkQnvQgOdby QH1syxAAnIqoQgfu1yfuwmMlrac8MdRIh3t+9AMJK3uibwz3sNHkHjYcx8bSGley c/XgkMA73vXD4NTfic/HUayTAYt/rFiIixZjsWwG8Fuf9iW5c0v6bDSit+GBEgKZ 3PlfWw2U/XGswjWW7vSCHEfG5jX9aaQCHKXl+8tHh20RLc/mkiWOsdm265rzGTXM D5bnzmGg9Bo+j85WnqpWI9Ur5eH6cwMfYHDKv9Tptd9fRGxEA3OmH7RBcgnqADpT /9mPY/cmOK2ZErhcX0cdqwq6w/xngrDgVRrvFE26IfnIFGmaG/IQGNfs3njfE5qs lPvAJNy8dg093fJ/q5IPgIFs5Z+0rbKd4X5xfaQ4V2jzzL7nEdrFoqdvLWAw201q asaRFtjZpvCmKnHH1uOGiLl4JrZdkzAfjU7Po+xSGB8L67mo5phLryUzJuTwy5X3 GG8Scx1n7HCBLsh5NaqXZtcHI7l8dWkM0S4pSCJEHcB0X6BIEUmJvtc0psK8Epyu FhSU3u0ysBcLMhndQo0VcLm4m7pAR7ZMzPl+rnn+iZ/oZtjxJnNgiNNmLtEgNv5v LI6EGdhwJDXrz21n/Kdbrsa5uS160KTu4Fif9rx834WBPF2CsyxRU/EFiAHf7KqA pqNesOgtZ1JnD42NFl0DO9yx2XrOP5WIIdHC/AfSsdd6lYES5bY= =FkPY -----END PGP SIGNATURE----- --sCNd3Ivk/oijKKf1--