1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

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
This commit is contained in:
Alvaro Herrera
2012-09-27 18:13:09 -03:00
parent a563d94180
commit 2164f9a125
17 changed files with 321 additions and 557 deletions

View File

@ -7146,7 +7146,7 @@ AlterObjectSchemaStmt:
AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt);
n->objectType = OBJECT_OPCLASS;
n->object = $4;
n->addname = $6;
n->objarg = list_make1(makeString($6));
n->newschema = $9;
n->missing_ok = false;
$$ = (Node *)n;
@ -7156,7 +7156,7 @@ AlterObjectSchemaStmt:
AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt);
n->objectType = OBJECT_OPFAMILY;
n->object = $4;
n->addname = $6;
n->objarg = list_make1(makeString($6));
n->newschema = $9;
n->missing_ok = false;
$$ = (Node *)n;