Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>,Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,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 05:15:09
Message-ID: 29320.1093238109@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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.

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.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Philip WarnerDate: 2004-08-23 06:06:14
Subject: Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE
Previous:From: Philip WarnerDate: 2004-08-23 04:56:58
Subject: Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE

pgsql-patches by date

Next:From: Philip WarnerDate: 2004-08-23 06:06:14
Subject: Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE
Previous:From: Philip WarnerDate: 2004-08-23 04:56:58
Subject: Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group