Re: pgsql: Give a more user-friendly error message in situation

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)svr1(dot)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Give a more user-friendly error message in situation
Date: 2004-10-18 03:28:37
Message-ID: 200410180328.i9I3SbV04049@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


Open items list updated for this fix and previous tablespace fix, and
new TODO item added:

* Allow a database in tablespace t1 with tables created in tablespace t2
to be used as a template for a new database created with default
tablespace t2

All objects in the default database tablespace must have default tablespace
specifications. This is because new databases are created by copying
directories. If you mix default tablespace tables and tablespace-specified
tables in the same directory, creating a new database from such a mixed
directory would create a new database with tables that had incorrect
explicit tablespaces. To fix this would require modifying pg_class in the
newly copied database, which we don't currently do.

---------------------------------------------------------------------------

Tom Lane wrote:
> Log Message:
> -----------
> Give a more user-friendly error message in situation where CREATE DATABASE
> specifies a new default tablespace and the template database already has
> some tables in that tablespace. There isn't any way to solve this fully
> without modifying the clone database's pg_class contents, so for now the
> best we can do is issue a better error message.
>
> Modified Files:
> --------------
> pgsql/src/backend/commands:
> dbcommands.c (r1.144 -> r1.145)
> (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c.diff?r1=1.144&r2=1.145)
> tablespace.c (r1.11 -> r1.12)
> (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablespace.c.diff?r1=1.11&r2=1.12)
> pgsql/src/include/commands:
> tablespace.h (r1.5 -> r1.6)
> (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/tablespace.h.diff?r1=1.5&r2=1.6)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
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-committers by date

  From Date Subject
Next Message Bruce Momjian 2004-10-18 11:45:27 pgsql: Update Japanese FAQ.
Previous Message Bruce Momjian 2004-10-18 03:27:15 pgsql: Update wording: * Allow a database in tablespace t1 with tables