I want to move all tables from schema xyz
to the default schema public
.
I can move individual tables with
ALTER TABLE table_name
SET SCHEMA public;
And I can get all tables with
SELECT table_name FROM information_schema.tables WHERE table_schema='xyz'
Is there any way to combine these two together?