pgsql: Further consolidation of DROP statement handling.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Further consolidation of DROP statement handling.
Date: 2011-11-18 02:32:48
Message-ID: E1RREG0-0000f2-3k@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Further consolidation of DROP statement handling.

This gets rid of an impressive amount of duplicative code, with only
minimal behavior changes. DROP FOREIGN DATA WRAPPER now requires object
ownership rather than superuser privileges, matching the documentation
we already have. We also eliminate the historical warning about dropping
a built-in function as unuseful. All operations are now performed in the
same order for all object types handled by dropcmds.c.

KaiGai Kohei, with minor revisions by me

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fc6d1006bda783cc002c61a5f072905849dbde4b

Modified Files
--------------
src/backend/commands/aggregatecmds.c | 53 +--------
src/backend/commands/dropcmds.c | 107 +++++++++++++++-
src/backend/commands/foreigncmds.c | 83 ------------
src/backend/commands/functioncmds.c | 111 ----------------
src/backend/commands/opclasscmds.c | 98 --------------
src/backend/commands/operatorcmds.c | 50 -------
src/backend/commands/proclang.c | 37 ------
src/backend/commands/trigger.c | 36 -----
src/backend/nodes/copyfuncs.c | 128 +------------------
src/backend/nodes/equalfuncs.c | 112 +----------------
src/backend/parser/gram.y | 170 ++++++++++++++-----------
src/backend/rewrite/rewriteRemove.c | 65 ----------
src/backend/tcop/utility.c | 193 +++++-----------------------
src/include/commands/defrem.h | 8 -
src/include/commands/proclang.h | 1 -
src/include/commands/trigger.h | 2 -
src/include/nodes/nodes.h | 8 -
src/include/nodes/parsenodes.h | 103 +--------------
src/include/rewrite/rewriteRemove.h | 3 -
src/test/regress/expected/foreign_data.out | 16 +--
src/test/regress/sql/foreign_data.sql | 5 +-
21 files changed, 241 insertions(+), 1148 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2011-11-18 02:59:50 pgsql: Remove scandir() requirement in pg_upgrade; instead just use re
Previous Message Tom Lane 2011-11-17 23:56:47 pgsql: Declare range inclusion operators as taking anyelement not anyno