W
W
WildZero2012-10-02 09:57:49
PostgreSQL
WildZero, 2012-10-02 09:57:49

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

1 answer(s)
P
pasha_golub, 2012-10-02
@WildZero

DROP SCHEMA test; ALTER SCHEMA public RENAME TO test; CREATE SCHEMA public;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question