Re: CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]
Date: 2013-09-26 13:22:40
Message-ID: 1380201760156-5772466.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tim Kane wrote
> However it seems this is not the case, and that the newly specified
> tablespace will only apply to objects that do not already have a
> tablespace
> defined in the templated database.

Note that all pre-existing objects have a tablespace by definition. If one
is not explicitly provided during the object's creation then the database
default tablespace is assigned and permanently affixed. Thus objects in the
tempate's default tablespace should not (in theory) be affected by changing
the default tablespace of the newly created database - those default
tablespace template objects will still be in the template's default
tablespace - or whichever tablespace was default when the object was created
(since the defaults can be changed).

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/CREATE-DATABASE-TEMPLATE-template-TABLESPACE-tablespace-name-tp5772451p5772466.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kohler Manuel 2013-09-26 13:35:00 JDBC driver for Postgres 9.3
Previous Message David Johnston 2013-09-26 13:14:50 Re: CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]