Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZ7ee-0006Y3-6c for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Jun 2019 05:43:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hZ7eb-0007gW-Uq for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Jun 2019 05:43:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZ7ea-0007gO-6m for pgsql-bugs@lists.postgresql.org; Fri, 07 Jun 2019 05:43:05 +0000 Received: from [66.111.4.25] (helo=out1-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hZ7eW-0005qn-D7 for pgsql-bugs@lists.postgresql.org; Fri, 07 Jun 2019 05:43:03 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E963921BF7; Fri, 7 Jun 2019 01:42:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 07 Jun 2019 01:42:38 -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=fm1; bh=y3JDs71tAPOJOi7vhco5w/rGFu9 XKbBy2z4AK7+GNM4=; b=tQglqz51bqj3cYN9VmCa/J7oTT6O6GO+jtM5LhCLEJ5 1Hg1VtrnGdEW6LnoZdNE3L5ZkHroG6U9NVtsMKbY54KZN4ZfNHeGlggHn96E2lww SOHSTzZQvhJRLlv+N6obAzUvFehcd5P8AvH/1Mp+wlS0nmor8M57gtyuLzsOZkQR UiA5R9hSxQbQd2dOVY/UK9CqhqSZ6xg5nuGU4FjiWtoJIrg0cMrt/xhJxVKu+UKu iugqtVysyS2vkVczzVp0LcpMmIkJlONBFqVety9uehtr8Zr2u84GpcKU9JkkMoYw ug0rViT7M2tJA5yofvK/4/OkAcBbIukf5xgZxFm7+nw== 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=fm2; bh=y3JDs7 1tAPOJOi7vhco5w/rGFu9XKbBy2z4AK7+GNM4=; b=M/qWVg788qFRQBsM6Fxwsm JJ4LCAyvMK9sHDVmp5pyZWMnSXLnRYizBjbNY6nofGpDETmBTKVlvm0h6EtUEDOy XG5fNkns5EbPyt8mbk/BvRFLw/IKQJPlUfHjujeVLfyXMQ+hRbRYg3C3a92RAiFT 2p6Gn4RH5Q/x5NQpU0ooF2AzirwxO/fyZYQIgQlDqbzzUCsTLqRvW2eYmpJyupa8 gY6ENe68Y049cOooKi6O4Ugyu1B/eaVoiOfJlYBuenYraUx0SaJZeL9MCWX7/Fto 7iRyt1hRJaRmM+rgrDda8GCCUuJ+phmDOayn1980NY0jZMNVg2Uk6GvKfoswbj1g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudeghedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt 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 3082980059; Fri, 7 Jun 2019 01:42:35 -0400 (EDT) Date: Fri, 7 Jun 2019 14:42:33 +0900 From: Michael Paquier To: Alvaro Herrera Cc: clemens@ladisch.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15833: defining a comment on a domain constraint fails with wrong OID Message-ID: <20190607054233.GG1736@paquier.xyz> References: <15833-808e11904835d26f@postgresql.org> <20190605181502.GA10753@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CNfT9TXqV7nd4cfk" Content-Disposition: inline In-Reply-To: <20190605181502.GA10753@alvherre.pgsql> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --CNfT9TXqV7nd4cfk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 05, 2019 at 02:15:02PM -0400, Alvaro Herrera wrote: > Confirmed. It works for superusers, which explains why the existing > regression tests pass -- and that's because check_object_ownership() > (which is handing the OBJECT_DOMCONSTRAINT case wrongly) is bypassed for > superusers. Annoyingly, get_object_address does not return the type's > OID, only the domain's. Well, it wouldn't be a problem to do a syscache lookup and then use the type from contypid, no? It seems to me that it would be more consistent to just add a pg_domain_constraint_ownercheck() in aclchk.c as all the syscache lookups happen their for all the other objects types. What do you think? -- Michael --CNfT9TXqV7nd4cfk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlz5+UkACgkQnvQgOdby QH3gTxAAoM1wd+Kj+33fBns4nmP8hpwkcbF5Toh4jnSU0/MdHWOhqMPkTeAJJt5J J7g3tc7LF6tjLiEfN/w4tCGYu4/ub6ZOI418tzQaGF9TCCmLA5xZFS/OkuL4TS1Y 1Ka2/PHcxhZYTAcqJJHDmkjqpzVxRQCHo8qvz5d44OdTEDqUhS5DVWHsMBnvTLe7 gvTqcx7ORdnnIDQVreSYruk60xhYXCQEu12hxD6rAoUdmMFaNSxZbdD+McrBje7J WXc2epO3WaMWPOZpFP401jVyvVFbbYp5K9TgiyxmtIOZ60B9Berdv/jg2YXnX/7T OTR5xAfXRiPgkyiJuOzzWsImBL8ML79rOMy+XkR2npoQ6DKfgZpflJoImGILIsFQ Hxxr4plUWb0dCi2wuH7Lc9m+VqkR2dhQt1qmyrdx+8/5VZqK9mIvKtgMJBjc8tRD vRHJu7MCmp9hPFsfmENxuWLUMY9smgjVFYL+hywNuF3AhulFjB81Z3tx+5Z7nT2C mx6zPWZBPDzsavHE+mZwYJN48PXjT2KLWtgsZ/EzT/mpJjQbajBMYaswwuk8Nb42 VRTRWgWC97WhmGc+EhPiGDrh76uDZ8Rstdhcj3lzXDXRD5ZxKFp3tyI4v/ntt4fF az93BRdgWpzwFzT5OG4caykTQ7U9a2wwe0R+J45vxpWJCfxb3tw= =FLcG -----END PGP SIGNATURE----- --CNfT9TXqV7nd4cfk--