pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: DROP FUNCTION of multiple functions
Date: Thu, 5 Jan 2017 19:37:24 -0600
Message-ID: <188f87f0-ce6a-233b-b4c5-4e769f915bfd@BlueTreble.com> (raw)
In-Reply-To: <cfe537ff-1ae8-d7c7-a5c2-72d23bcdd713@BlueTreble.com>
References: <6dcd1248-4631-a4c1-65d7-b873fbcada6c@2ndquadrant.com>
	<20161101151503.GA29685@eldon.alvh.no-ip.org>
	<1932.1479938694@sss.pgh.pa.us>
	<42459fde-dab9-dd27-7576-03a642b8c6c5@2ndquadrant.com>
	<44639202-2e20-78d4-71bf-e390b4d7bf13@2ndquadrant.com>
	<cfe537ff-1ae8-d7c7-a5c2-72d23bcdd713@BlueTreble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Forwarding some comments I neglected to send to the list...

On 1/3/17 9:16 AM, Peter Eisentraut wrote:
 > On 1/2/17 1:04 PM, Jim Nasby wrote:
>> On 12/31/16 10:17 AM, Peter Eisentraut wrote:
>>> --- a/src/test/regress/expected/event_trigger.out
>>> +++ b/src/test/regress/expected/event_trigger.out
>>> @@ -80,9 +80,6 @@ create event trigger regress_event_trigger2 on
>>> ddl_command_start
>>>     execute procedure test_event_trigger();
>>>  -- OK
>>>  comment on event trigger regress_event_trigger is 'test comment';
>>> --- should fail, event triggers are not schema objects
>>> -comment on event trigger wrong.regress_event_trigger is 'test comment';
>>> -ERROR:  event trigger name cannot be qualified
>>>  -- drop as non-superuser should fail
>>>
>>> I'm guessing that's a spurious change...
>>>
 >> Well, the test is no longer useful as it was before, because the parser
 >> just rejects the command.
 >
 > Ah. I would have just left it in to make sure a sane error was still
 > generated, so I was wondering if something else was going on.

>>> +++ b/src/test/regress/expected/object_address.out
>>> @@ -287,7 +287,7 @@ WARNING:  error for function of access
>>> method,{eins,zwei,drei},{integer}: argume
>>>  SELECT pg_get_object_address('language', '{one}', '{}');
>>>  ERROR:  language "one" does not exist
>>>  SELECT pg_get_object_address('language', '{one,two}', '{}');
>>> -ERROR:  language name cannot be qualified
>>> +ERROR:  name list length must be exactly 1
>>>
>>> Arguably, in this usage, that should be array length, not list length.
>>> IIRC there's a function that will map an object type to it's name, so it
>>> wouldn't be hard to restore the previous error message if you wanted to
>>> go that route. pg_get_object_address() has to do a bunch of similar
>>> error checks too, maybe there's a way to combine this stuff.
>>>
>>> It's somewhat unfortunate that
>>> pg_get_object_address()/pg_identify_object_as_address() won't match
>>> these changes, but I don't see any good way to fix that.
>>>
>>> BTW, it would also be damn nice if there was some form of wildcard
>>> available for DROP FUNCTION (and maybe ALTER). If you've created several
>>> overloaded versions of a function, making sure you change all of them
>>> can be a PITA.
 >> Yeah, that's the next patch after this. ;-)
 >
 > Yay :)
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (17+ messages)  latest in thread

Message-ID: <188f87f0-ce6a-233b-b4c5-4e769f915bfd@BlueTreble.com>
Permalink:  ../188f87f0-ce6a-233b-b4c5-4e769f915bfd@BlueTreble.com/
Also on:    postgresql.org/message-id/188f87f0-ce6a-233b-b4c5-4e769f915bfd@BlueTreble.com

 · 

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-hackers@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: DROP FUNCTION of multiple functions
  In-Reply-To: <188f87f0-ce6a-233b-b4c5-4e769f915bfd@BlueTreble.com>

* 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