Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name
От
a Marath
Тема
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name
Дата
Msg-id
BYAPR07MB54787810E191A0C9A6AB4CDDAB890@BYAPR07MB5478.namprd07.prod.outlook.com
Ответ на
BUG #15572: Misleading message reported by "Drop function operation"on DB with functions having same name (David G. Johnston)
Список
Дерево обсуждения
BUG #15572: Misleading message reported by "Drop function operation"on DB with functions having same name PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Michael Paquier <michael@paquier.xyz>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Michael Paquier <michael@paquier.xyz>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Julien Rouhaud <rjuju123@gmail.com>
Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Julien Rouhaud <rjuju123@gmail.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Julien Rouhaud <rjuju123@gmail.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Michael Paquier <michael@paquier.xyz>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name David Rowley <david.rowley@2ndquadrant.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name a Marath <makmarath@hotmail.com>
BUG #15572: Misleading message reported by "Drop function operation"on DB with functions having same name "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name a Marath <makmarath@hotmail.com>
Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name a Marath <makmarath@hotmail.com>
I second David J. Suggestion.
To add to the possible list of solutions I also propose another solution and for better consistency between both the operation
Fix the error message reported by the "drop function without IF Exists" and make it similar to the "Drop.. If Exists".
If no parameters are passed by user then let the "DROP FUNCTION" routine only check for a function of that name which has no parameters => "func1()"
Ash
A Marath.
From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Friday, January 4, 2019 1:10:05 AM
To: David Rowley
Cc: makmarath@hotmail.com; pgsql-bugs@lists.postgresql.org
Subject: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Sent: Friday, January 4, 2019 1:10:05 AM
To: David Rowley
Cc: makmarath@hotmail.com; pgsql-bugs@lists.postgresql.org
Subject: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
On Thursday, January 3, 2019, David Rowley <david.rowley@2ndquadrant.com> wrote:
If we changed the behaviour of this then
someone might equally come along later and complain that they
specified "IF EXISTS" and got an error.
I’m inclined to argue that the docs say you can only use the omitted-args name if it is unique within the schema. Since the second case is using that form in violation of that requirement reporting an error would match the documentation.
IF EXISTS only applies when no functions exist; an error for ambiguity doesn’t violate its promise; and likely even if we didn’t make it an error something else will fail later on.
It is wrong for the drop function if exists command to translate/print the omitted-args form of the name into a function with zero arguments; it should not be looking explicitly for a zero-arg function as it is not the same thing (as emphasized in the docs).
So, I vote for changing this in 12 but leaving prior versions as-is for compatability as the harm doesn’t seem to be enough to risk breakage. Might be worth a doc patch showing the second case for the back branches (Head seems like it would be good as we are fixing the code to match the documentation, IMO).
David J.
В списке pgsql-bugs по дате отправления
От: Dmitry Dolgov
Дата:
От: Alvaro Herrera
Дата: