I have many tables created in the "public" schema and I would like to
migrate these into an "x001" schema. Unfortunately there is no ALTER
TABLE construct for this... The following SQL would seem to move the
"zxc" table from "public.zxc" to "x001.zxc":
UPDATE pg_class
SET relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'x001')
FROM pg_namespace
WHERE pg_class.relname = 'zxc' AND
pg_namespace.nspname = 'public' AND
pg_class.relnamespace = pg_namespace.oid
Has anyone else addressed this before? Recommendations?
Thanks, L.