pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Michael Paquier <michael@paquier.xyz>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Ash M <makmarath@hotmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Date: Wed, 20 Feb 2019 14:56:27 +0900
Message-ID: <20190220055627.GH15532@paquier.xyz> (raw )
In-Reply-To: <CAKJS1f-N9NC7K41fRwgRyHEUiBbOLB_Lmhsfu8AnHt2=ZkqBoQ@mail.gmail.com >
References: <CAKJS1f9bAsZVodugqwAS6kSEtrOQKOEpdeBVJALR8iEZf9kHXg@mail.gmail.com >
<20190212030927.GF1475@paquier.xyz >
<CAKJS1f9=CdJotJBvjoQfNipPjaVXdDLN1+K-07QFehTGOYH+_g@mail.gmail.com >
<7757.1550442703@sss.pgh.pa.us >
<CAOBaU_bPFBb=BA8Askv+1yvcrCFE0-zk3R8XwgbHTY4bhfy1fg@mail.gmail.com >
<32561.1550594759@sss.pgh.pa.us >
<CAOBaU_bzP+8nmSaidDtkVBji8hxuXKwGHxjJ7yPRCYD4r-Sovw@mail.gmail.com >
<CAKJS1f9wOa1CdgFm27NusPZODnL9SkJzxyNuq88VywPj9gS3vg@mail.gmail.com >
<CAOBaU_Z1Sbd1ZtAjex59PFRKFqcZmJ8sy7s_mqX0T227kZ1Fkg@mail.gmail.com >
<CAKJS1f-N9NC7K41fRwgRyHEUiBbOLB_Lmhsfu8AnHt2=ZkqBoQ@mail.gmail.com >
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 = LookupFuncWithArgs(objtype, castNode(ObjectWithArgs, object), missing_ok);
+ address.objectId = LookupFuncWithArgs(objtype, castNode(ObjectWithArgs, object),
+ missing_ok ? FUNCLOOKUP_ERRIFAMBIGUOUS :
+ 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?
I think that the right call is to add the object type into the
arguments of LookupFuncName().
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../20190220055627.GH15532@paquier.xyz/2-signature.asc)
download
view thread (38+ messages) latest in thread
Message-ID: <20190220055627.GH15532@paquier.xyz>
Permalink: ../20190220055627.GH15532@paquier.xyz/
Also on: postgresql.org/message-id/20190220055627.GH15532@paquier.xyz
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, david.rowley@2ndquadrant.com, rjuju123@gmail.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, makmarath@hotmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
In-Reply-To: <20190220055627.GH15532@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox