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 1gwKsG-0005UH-6f for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Feb 2019 05:56:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gwKsD-0000lg-VL for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Feb 2019 05:56:49 +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 1gwKsC-0000dg-7u for pgsql-bugs@lists.postgresql.org; Wed, 20 Feb 2019 05:56:49 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gwKs7-00046N-MP for pgsql-bugs@lists.postgresql.org; Wed, 20 Feb 2019 05:56:47 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C258E229F1; Wed, 20 Feb 2019 00:56:41 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 20 Feb 2019 00:56:41 -0500 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=NcB7eV/ddF3w49WTRxVzQ728cUA h82Hl3ii2rhcN3cg=; b=RJ3Z5ApqUKmoWvwxwc9Vgu2WA68DbA8FNgbz58kQ2/h /rCvTBiv7mIQfdjalAqMwR+h24VE6KjesJ/Jhij47AQCZllZEZjOw03/Yf9az5TZ Rj1/tJSUpZR6oXzwNhU6gFadzPM8b/nqZBiR63G7p5OG40G6tpzej/w2EmZubcTL k5ZyILW/90+/R4Ayqnf+9BrvLWBgN3JQpxc9CDscJa/j7tYG4I3Udtq1n/wXZHhy ursm+rSJspUEhtp6jalYmk1WjqnGtB2ePGbxOwQ1i81uC3+OKlbMNlYMKeMITPrh wvDKBAuEE6I+XB65RCSzWDbThf3XoIlqdQGL1l59wSg== 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=NcB7eV /ddF3w49WTRxVzQ728cUAh82Hl3ii2rhcN3cg=; b=AoRIbrR1DM0p7dMwRM7YAM 1TrgsYKMjpW438JB4+R4zAl9EiPxRloiH0bgAwG7ni6Kb+JCNYxlCy4CLKkrsClq DzBnfRmHPONVnvMLSMWdKyP/EJeaO/KaZ02yaKrm5KdCQIrwUQa+nMLiek9bshSP UUdqIIEV7M+4xX1n7bg1bK++OuiWYI5Lnx4rFll2DhKcXV+LSbsUnKlZe6EjbPoV 7jy0BVx7lecsrEprTt7aXYDeNsLcX+KMlMVYz2Yp/4LNG9jKU8RElydldqJt1F3J qlD4kTdxr0JIJI1oWMK/6S+x+eFrsMc6Y49ibQWv2Qgh5yxzMeaqSTvI6Lj6v01g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtdehgdeludculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepuddukedrvdeguddrvdehtddrudeiudenucfrrghr rghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (mp76f1faa1.ap.nuro.jp [118.241.250.161]) by mail.messagingengine.com (Postfix) with ESMTPA id 3A31510288; Wed, 20 Feb 2019 00:56:39 -0500 (EST) Date: Wed, 20 Feb 2019 14:56:27 +0900 From: Michael Paquier To: David Rowley Cc: Julien Rouhaud , Tom Lane , Alvaro Herrera , Ash M , PostgreSQL mailing lists Subject: Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name Message-ID: <20190220055627.GH15532@paquier.xyz> References: <20190212030927.GF1475@paquier.xyz> <7757.1550442703@sss.pgh.pa.us> <32561.1550594759@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="b2u6xDyV6U2OU5E0" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --b2u6xDyV6U2OU5E0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 20, 2019 at 09:57:19AM +1300, David Rowley wrote: > Great. Thanks for reviewing it. You forgot to change a call of LookupFuncWithArgs() in CreateTransform(). - address.objectId =3D LookupFuncWithArgs(objtype, castNode(ObjectWithAr= gs, object), missing_ok); + address.objectId =3D LookupFuncWithArgs(objtype, castNode(ObjectWithAr= gs, object), + missing_ok ? FUNCLOOKUP_ERRIFAMB= IGUOUS : + FUNCLOOKUP_NORMAL); LookupFuncWithArgs() calls itself LookupFuncName(), which may not use the check type provided by the caller.. I think that the existing API is already confusing enough, and this patch makes it a bit more confusing by adding an extra error layer handling on top of it. Wouldn't it be more simple from an error handling point of view to move all the error handling into LookupFuncName() and let the caller decide what kind of function type handling it expects from the start? =20 I think that the right call is to add the object type into the arguments of LookupFuncName(). -- Michael --b2u6xDyV6U2OU5E0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlxs7AsACgkQnvQgOdby QH36tA/+Kv8zw+9kzf+TC+EWRJPaDOwOX9lbZn0FBhQJvL4uNaESyaAhglcZUDsf uov20fQrZ9/CP/XHRUkYt4P8A04/w02hL6IfLfODxGkq6EM8GzGBFA7Vdv4AgNuw wfBXI7QgYR/LuiH/uICav3ssSXFEPclyrDNawAY80vrlK7DdPJBh7w2IT1EIVbsA Xxxbkgk0ukFHwu2qa2B+8YyJy7kzrxxSbq70eAQgHV6xU8pP945uvVGIxFYAPR+J P/CJGX1NVesx9fQTg2CSbcHxIk6yRfUTiOFxZbt4HXMQo9Mwxs926u/ZO5c1M05x fUIQzEFO0xoAymvAWu0SJ73CVWLQ6rff6m6pDAbN0+gY/t6JgPbdEMwAgbSnucrr GClRIuo4D6JxmG97ttjCfCglzJowhVNbBdZM934AAiW0YnQSaO3iwF7B+/ALM9BW 6FH3FivsgkKRtBfJpQMac3LkB7j8zTsczmhbjXxaoMfPLW8BopP6LZwpu6/VbXZt DdZ1NghzgKRCGQHr58ihsV4B2YtkhkIYb0pcwzPhae8FXuwz759CZlq5di69F8K6 LuzbZH6gxvDKiLCJFXH9GDV1jrSXsN/JYDfIw9mj/JhXcZHpf5nGgDTYGcMSyRKv X+4ki4idwM/HyOkVaiNAivt1z/7vt6a9tDNJH6JFKLU7FjI13J4= =N6YO -----END PGP SIGNATURE----- --b2u6xDyV6U2OU5E0--