pgsql: Refactor "ALTER some-obj SET SCHEMA" implementation - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Refactor "ALTER some-obj SET SCHEMA" implementation
Date
Msg-id E1TJ9tJ-0001h9-Aq@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Refactor "ALTER some-obj SET SCHEMA" implementation

Instead of having each object type implement the catalog munging
independently, centralize knowledge about how to do it and expand the
existing table in objectaddress.c with enough data about each object
type to support this operation.

Author: KaiGai Kohei
Tweaks by me
Reviewed by Robert Haas

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2164f9a1254980a02ef9ca99ee3bcb8c1298b219

Modified Files
--------------
src/backend/catalog/objectaddress.c   |  268 +++++++++++++++++++++++++++++----
src/backend/commands/alter.c          |  120 ++++++---------
src/backend/commands/collationcmds.c  |    9 +-
src/backend/commands/conversioncmds.c |   50 ------
src/backend/commands/dropcmds.c       |    1 -
src/backend/commands/functioncmds.c   |   33 +---
src/backend/commands/opclasscmds.c    |  104 -------------
src/backend/commands/operatorcmds.c   |   53 -------
src/backend/commands/tsearchcmds.c    |  188 -----------------------
src/backend/nodes/copyfuncs.c         |    1 -
src/backend/nodes/equalfuncs.c        |    1 -
src/backend/parser/gram.y             |    4 +-
src/include/catalog/objectaddress.h   |   12 ++-
src/include/commands/alter.h          |    7 +-
src/include/commands/conversioncmds.h |    2 -
src/include/commands/defrem.h         |   14 --
src/include/nodes/parsenodes.h        |    1 -
17 files changed, 316 insertions(+), 552 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Standardize naming of malloc/realloc/strdup wrapper functions.
Next
From: Tom Lane
Date:
Subject: pgsql: Work around unportable behavior of malloc(0) and realloc(NULL, 0