Directly associate primary key with user-defined tablespace

Started by MichaelDBAabout 3 years ago1 messages
#1MichaelDBA
MichaelDBA@sqlexec.com

Hi all!

PG by default always creates the primary key in the default tablespace
unless you specify it to use an index that is defined in a user-defined
tablespace.

We can create indexes in user-defined tablespaces, why can't we create 
a primary key in a user-defined tablespace without having to associate
it with an index? Something like:
ALTER TABLE myschema.mytable ADD PRIMARY KEY (akey) tablespace mytablespace;

Regards,

Michael Vitale