Re: Tablespaces - Mailing list pgsql-novice

From Luca Ferrari
Subject Re: Tablespaces
Date
Msg-id CAKoxK+5bDHm9ufj2U4K0UYqwbpo3Bd6hfnNyeUpj0nhx21A3Rw@mail.gmail.com
Whole thread Raw
In response to Tablespaces  (James David Smith <james.david.smith@gmail.com>)
Responses Re: Tablespaces  (James David Smith <james.david.smith@gmail.com>)
List pgsql-novice
On Mon, Sep 23, 2013 at 5:50 PM, James David Smith
<james.david.smith@gmail.com> wrote:

> SELECT relname FROM pg_tablespace;
>

Uh? There is no relname in pg_tablespace:
http://www.postgresql.org/docs/current/static/catalog-pg-tablespace.html

> But when they run a command such as this, the new database is still
> made in the default directory, rather than the persona folder:
>
> CREATE DATABASE testing(i int)
>
> Would appreciate any thoughts and guidance please. The aim is to keep
> everyone's work in their own folders.

According to the documentation
(http://www.postgresql.org/docs/9.2/static/runtime-config-client.html)
if the tablespace name does not match any existing table space
PostgreSQL will default to default (i.e., will create objects in the
default tablespace). Moreover: "This variable is also not used when
creating databases. By default, a new database inherits its tablespace
setting from the template database it is copied from."


Luca


pgsql-novice by date:

Previous
From: Mael Rimbault
Date:
Subject: Re: Tablespaces
Next
From: James David Smith
Date:
Subject: Re: Tablespaces