Directly associate primary key with user-defined tablespace

From: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Directly associate primary key with user-defined tablespace
Date: 2022-12-07 11:56:55
Message-ID: bcd5606e-3949-1551-4130-c1994e635ac3@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2022-12-07 11:57:09 Re: moving extraUpdatedCols out of RangeTblEntry (into ModifyTable)
Previous Message Amit Langote 2022-12-07 11:54:36 moving extraUpdatedCols out of RangeTblEntry (into ModifyTable)