Does anyone object to extending the grammar to allow this?
ALTER TABLE test ADD PRIMARY KEY (a) TABLESPACE foo;
ALTER TABLE test ADD UNIQUE (a) TABLESPACE foo;
CREATE TABLE test (a INTEGER PRIMARY KEY TABLESPACE foo);
CREATE TABLE test (a INTEGER UNIQUE TABLESPACE foo);
This is needed since we can move indexes between tablespaces now. It
makes pg_dump support for it possible and prevents huge performance cost
associated with creating the primary key and then having to move it.
If there are no objects, I've already mostly finished the patch and I'll
send it in.
Chris