Thread: COPYING A DATABASE TO ANOTHER TABLESPACE

COPYING A DATABASE TO ANOTHER TABLESPACE

From
"JORGE MALDONADO"
Date:
I created a database in the default tablespace and added the required objects like tables and indexes. Now, I noticed that I need it in a different tablespace. I know that one way to solve this issue is to create the database again and add tables and indexes.
Is it possible to get a copy of my complete database from the default tablespace to another?
 
With respect,
Jorge Maldonado

Re: COPYING A DATABASE TO ANOTHER TABLESPACE

From
Tom Lane
Date:
"JORGE MALDONADO" <jorgemal1960@gmail.com> writes:
> I created a database in the default tablespace and added the required
> objects like tables and indexes. Now, I noticed that I need it in a
> different tablespace. I know that one way to solve this issue is to create
> the database again and add tables and indexes.
> Is it possible to get a copy of my complete database from the default
> tablespace to another?

Try CREATE DATABASE with the original DB as template.

            regards, tom lane