Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE
Date: 2004-08-31 18:57:28
Message-ID: 200408311857.i7VIvSS14429@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Fabien COELHO wrote:
>
> Dear Tom,
>
> > > psql> CREATE TABLE bla.boo(id SERIAL PRIMARY KEY);
> >
> > > Now you have schema bla, table bla.boo, index bla.boo_pkey and sequence
> > > bla.boo_id_seq all in tablespace foo.
> >
> > Hmm, that's a bug.
>
> If you consider that a bug, then you can also add: "CREATE SEQUENCE bla.sg;"
>
> > The intention was that sequences would always be in the database default
> > tablespace. I'm not sure why this case is overriding that ...
>
> It does what the doc says about schema tablespaces:
>
> "The name of the tablespace that is to be the default tablespace for
> all new objects created in the schema. If not supplied, the schema will
> inherit the default tablespace of the database."
>
> and that looks sound enough to me...

Good point. If we put sequences in the database default location it
would be inconsistent with other object location, but this does bring up
the problem of being unable to move sequences to get rid of a
tablespace.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-31 19:42:41 Still a loose end in GUC USERLIMIT stuff
Previous Message Joshua D. Drake 2004-08-31 17:28:12 Re: Storing a query plan...

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2004-08-31 19:36:45 Timezones on localized windows
Previous Message Fabien COELHO 2004-08-31 15:01:19 Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE