Answer the question
In order to leave comments, you need to log in
Copying data from one schema to another
Good afternoon.
The situation is as follows.
There is a postgresql 9.1 database, there are 2 schemas in the database: public and test. Now you need to completely copy both the structure and the data from public to test.
I searched google but couldn't find how to do it.
Answer the question
In order to leave comments, you need to log in
DROP SCHEMA test;
ALTER SCHEMA public RENAME TO test;
CREATE SCHEMA public;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question