How I can copy my public
schema into the same database with full table structure, data, functions, fk, pk and etc.
My version of Postgres is 8.4
P.S. I need to copy schema NOT database
PostgreSQL – How to Create Full Copy of Database Schema in Same Database
postgresql
Best Answer
There's no simple way to do this in pg_dump/pg_restore itself. You could try the following if you are able to remove the database temporarily.