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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, 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-23 14:09:33
Message-ID: 200408231409.i7NE9X809863@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> > So, if you do make the changes, will the schema definition be affected by
> > those changes, or do you expect the tablespace to be embedded in the CREATE
> > SCHEMA command?
>
> I thought the idea was for pg_dump to emit something like
>
> SET magic_tablespace_variable = some_ts;
>
> CREATE TABLE foo (columns...);
>
> rather than
>
> CREATE TABLE foo (columns...) TABLESPACE some_ts;
>
> the point being no more and no less than this: if "some_ts" doesn't
> exist (or you have other problems like insufficient permissions) then
> the SET command will fail but CREATE TABLE will still succeed, allowing
> the restore to complete in some reasonable fashion.

Right, this would eliminate our non-standard TABLESPACE clause appearing
in pg_dump CREATE TABLEs.

> I am quite unsure why you are pushing this while also insisting that
> we need "die_on_errors" mode for pg_restore. If you are going to die
> on the first error then these alternatives are equally brittle.

I assume he wants to give users maximum flexibility.

--
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 Oliver Elphick 2004-08-23 14:19:26 Re: monetary bug
Previous Message Bruce Momjian 2004-08-23 14:08:34 Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE

Browse pgsql-patches by date

  From Date Subject
Next Message Marc G. Fournier 2004-08-23 14:41:34 Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE
Previous Message Bruce Momjian 2004-08-23 14:08:34 Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE