DROP FUNCTION of multiple functions

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: DROP FUNCTION of multiple functions
Date: 2016-11-01 04:55:13
Message-ID: 6dcd1248-4631-a4c1-65d7-b873fbcada6c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here is a patch series that implements several changes in the internal
grammar and node representation of function signatures. They are not
necessarily meant to be applied separately, but they explain the
progression of the changes nicely, so I left them like that for review.

The end goal is to make some user-visible changes in DROP FUNCTION and
possibly other commands that refer to functions.

With these patches, it is now possible to use DROP FUNCTION to drop
multiple functions at once: DROP FUNCTION func1(), func2(), func3().
Other DROP commands already supported that, but DROP FUNCTION didn't
because the internal representation was complicated and couldn't handle it.

The next step after this would be to allow referring to functions
without having to supply the arguments, if the name is unique. This is
an SQL-standard feature and would be very useful for dealing "business
logic" functions with 10+ arguments. The details of that are to be
worked out, but with the help of the present changes, this would be a
quite localized change, because the grammar representation is well
encapsulated.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Use-grammar-symbol-function_with_argtypes-consistent.patch text/x-patch 3.9 KB
0002-Move-function_with_argtypes-to-a-better-location.patch text/x-patch 1.8 KB
0003-Add-aggregate_with_argtypes-and-use-it-consistently.patch text/x-patch 6.2 KB
0004-Pass-around-function-signatures-as-FuncWithArgs.patch text/x-patch 10.9 KB
0005-Allow-dropping-multiple-functions-at-once.patch text/x-patch 7.4 KB
0006-Replace-LookupFuncNameTypeNames-with-LookupFuncWithA.patch text/x-patch 16.0 KB
0007-Pass-operators-around-with-FuncWithArgs-as-well.patch text/x-patch 16.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mithun Cy 2016-11-01 06:03:50 Re: Patch: Implement failover on libpq connect level.
Previous Message Dilip Kumar 2016-11-01 04:54:51 Re: BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.