Centralize some ALTER <whatever> .. SET SCHEMA checks.
authorRobert Haas <rhaas@postgresql.org>
Tue, 23 Nov 2010 00:46:15 +0000 (19:46 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 23 Nov 2010 00:53:34 +0000 (19:53 -0500)
commit44475e782f4674d257b9e5c1a3930218a4b4deea
tree2bf5afa62c678a3a29abfbadf41a41682837c809
parent5272d7987506554f6b2bde740e1b4d7e4a0b8608
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.
src/backend/catalog/dependency.c
src/backend/catalog/namespace.c
src/backend/commands/functioncmds.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/include/catalog/dependency.h
src/include/catalog/namespace.h