Moderator: Moderators
MrFlibble wrote:I think its just
ALTER TABLE my_table SET TABLESPACE new_tablespace
I haven't tried it yet...
SET TABLESPACE
This form changes the table's tablespace to the specified tablespace and moves the data file(s) associated with the table to the new tablespace. Indexes on the table, if any, are not moved; but they can be moved separately with additional SET TABLESPACE commands.
_dave_ wrote: - much easier to use the "CREATE DATABASE xxx TABLESPACE xxx" method I posted here, import the schema.sql file, then all tables / indexes etc are on the alternate tablespace in two commands.
The ALTER DATABASE command doesn't seem to be able to set tablespaces after a quick read :(
Return to PostgreSQL [Read Only]
Users browsing this forum: No registered users and 9 guests