Centralize some ALTER <whatever> .. SET SCHEMA checks.

Robert Haas <rhaas@postgresql.org>

Commit: 44475e782f4674d257b9e5c1a3930218a4b4deea
Author: Robert Haas <rhaas@postgresql.org>
Date: 2010-11-23T00:53:34Z
Releases: 9.1.0
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