Thread: ALTER SCHEMA ... SET TABLESPACE
This patch implements ALTER SCHEMA ... SET TABLESPACE. This changes the default schema tablespace but does not attempted to move objects within the schema to the new tablespace. Docs, regression test and tab-completion included. There were a few places which conflicted with my alter index patch and I've tried to edit the diff where possible to allow for easy applying. Gavin
Attachment
This has been saved for the 8.1 release: http:/momjian.postgresql.org/cgi-bin/pgpatches2 --------------------------------------------------------------------------- Gavin Sherry wrote: > This patch implements ALTER SCHEMA ... SET TABLESPACE. > > This changes the default schema tablespace but does not attempted to move > objects within the schema to the new tablespace. > > Docs, regression test and tab-completion included. > > There were a few places which conflicted with my alter index patch and > I've tried to edit the diff where possible to allow for easy applying. > > Gavin Content-Description: [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
I am thinking some day we will need: ALTER SCHEMA ... SET NEW TABLESPACE and ALTER SCHEMA ... SET CURRENT TABLESPACE to specify if existing objects are moved, but at this point we aren't going to get the later in 8.1, so I guess we will just go with an unadorned stynax. In fact, the new syntax might just be: ALTER SCHEMA ... MOVE TABLESPACE or ALTER SCHEMA ... RELOCATE TABLESPACE Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --------------------------------------------------------------------------- Gavin Sherry wrote: > This patch implements ALTER SCHEMA ... SET TABLESPACE. > > This changes the default schema tablespace but does not attempted to move > objects within the schema to the new tablespace. > > Docs, regression test and tab-completion included. > > There were a few places which conflicted with my alter index patch and > I've tried to edit the diff where possible to allow for easy applying. > > Gavin Content-Description: [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
On Sat, 4 Jun 2005, Bruce Momjian wrote: > > I am thinking some day we will need: > > ALTER SCHEMA ... SET NEW TABLESPACE > > and > > ALTER SCHEMA ... SET CURRENT TABLESPACE > > to specify if existing objects are moved, but at this point we aren't > going to get the later in 8.1, so I guess we will just go with an > unadorned stynax. I must have missed something (likely, as I've been away from a computer for 6 weeks) but didn't we scrap the idea of schemas having a default tablespace? Gavin
Gavin Sherry <swm@linuxworld.com.au> writes: > I must have missed something (likely, as I've been away from a computer > for 6 weeks) but didn't we scrap the idea of schemas having a default > tablespace? Yeah, we did, but Bruce has still got that old patch of yours in his to-do queue. It's irrelevant now, Bruce ... regards, tom lane
Patch withdrawn by author --- not needed. --------------------------------------------------------------------------- Gavin Sherry wrote: > This patch implements ALTER SCHEMA ... SET TABLESPACE. > > This changes the default schema tablespace but does not attempted to move > objects within the schema to the new tablespace. > > Docs, regression test and tab-completion included. > > There were a few places which conflicted with my alter index patch and > I've tried to edit the diff where possible to allow for easy applying. > > Gavin Content-Description: [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Thanks, removed. --------------------------------------------------------------------------- Tom Lane wrote: > Gavin Sherry <swm@linuxworld.com.au> writes: > > I must have missed something (likely, as I've been away from a computer > > for 6 weeks) but didn't we scrap the idea of schemas having a default > > tablespace? > > Yeah, we did, but Bruce has still got that old patch of yours in his > to-do queue. It's irrelevant now, Bruce ... > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073