BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: makmarath(at)hotmail(dot)com
Subject: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Date: 2019-01-03 20:27:33
Message-ID: 15572-ed1b9ed09503de8a@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

The following bug has been logged on the website:

Bug reference: 15572
Logged by: Ash Marath
Email address: makmarath(at)hotmail(dot)com
PostgreSQL version: 10.5
Operating system: RDS (on Amazon)
Description:

Scenario:
DB has 2 functions with same name.
DB: testDB
Schema: test
Function 1: test.func1(param1 text, param2 text)
Function 2: test.func1(param1 text)
---------------------------------
Issue: Misleading message reported by "DROP FUNCTION" command with the above
scenario

Step 1:
Run the command : DROP FUNCTION test.func1;

NOTE: This operation failed to execute the drop and reported the following
message

Message reported by PgAdmin4 & OmniDB:
---- start of message ------
function name "test.func1" is not unique
HINT: Specify the argument list to select the function
unambiguously.
---- end of message ------
--------------------------------------------------------------------------------------------------------
Step 2:
Run the command : DROP FUNCTION IF EXISTS test.func1;

NOTE: This operation completed successfully without error and reported the
following message

Message reported by PgAdmin4 & OmniDB:
---- start of message ------
function admq.test1() does not exist, skipping
---- end of message ------
-----------------------------------------------------------------------------------------------------------
Proposed solution:
The operation in Step 2 should have failed with the same error as reported
in Step 1;

Thanks
Ash Marath
makmarath(at)hotmail(dot)com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-01-03 21:01:14 Re: Unified logging system for command-line programs
Previous Message Alvaro Herrera 2019-01-03 20:15:08 Re: [PATCH] get rid of StdRdOptions, use individual binary reloptions representation for each relation kind instead

Browse pgsql-bugs by date

  From Date Subject
Next Message Hugh Ranalli 2019-01-03 21:48:33 Re: BUG #15548: Unaccent does not remove combining diacritical characters
Previous Message Stephen Frost 2019-01-03 20:08:43 Re: BUG #15570: Vacuum analyze ERROR: MultiXactId XXXX has not been created yet -- apparent wraparound