Centralize some ALTER <whatever> .. SET SCHEMA checks.
Robert Haas <rhaas@postgresql.org>
Centralize some ALTER <whatever> .. SET SCHEMA checks. Any flavor of ALTER <whatever> .. SET SCHEMA fails if (1) the object is already in the new schema, (2) either the old or new schema is a temp schema, or (3) either the old or new schema is the TOAST schema. Extraced from a patch by Dimitri Fontaine, with additional hacking by me.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/dependency.c | modified | +15 −0 |
| src/backend/catalog/namespace.c | modified | +34 −0 |
| src/backend/commands/functioncmds.c | modified | +2 −18 |
| src/backend/commands/tablecmds.c | modified | +2 −18 |
| src/backend/commands/typecmds.c | modified | +2 −18 |
| src/include/catalog/dependency.h | modified | +1 −0 |
| src/include/catalog/namespace.h | modified | +2 −0 |