| From: | Amos Bird <amosbird(at)gmail(dot)com> | 
|---|---|
| To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> | 
| Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: make default TABLESPACE belong to target table. | 
| Date: | 2016-11-26 02:25:01 | 
| Message-ID: | 87shqff05e.fsf@gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> The only scenario where this would be useful is when using ALTER TABLE
> ADD CONSTRAINT in which case a fresh index is built (not USING INDEX).
> That's a bit narrow, because it would mean that you would either
> append a TABLESPACE clause to this existing clause, or create a
> storage parameter to enforce all indexes created for a relation on a
> wanted tablespace... For the other cases you could just do something
> like that, and that's what the large majority of people would care
> about:
> SET default_tablespace TO 'foo';
> CREATE TABLE foobar (id int PRIMARY KEY);
> But that's not the one you are interesting in, so likely a storage
> parameter is what pops up in my mind, with parameter defined at table
> creation: CREATE TABLE foo (id primary key) WITH
> (constraint_default_tablespace = foo) TABLESPACE bar;
> In this case the parent relation gets created in tablespace bar, but
> its primary key gets in tablespace foo.
How about making a storage parameter "default_tablespace" that also
covers CREATE INDEX and other stuff?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2016-11-26 03:27:56 | Re: make default TABLESPACE belong to target table. | 
| Previous Message | Amos Bird | 2016-11-26 02:19:45 | Re: make default TABLESPACE belong to target table. |