Re: [GENERAL] creating tables in tablespace - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] creating tables in tablespace
Date
Msg-id 7180.1503600368@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] creating tables in tablespace  (Tiffany Thang <tiffanythang@gmail.com>)
Responses Re: [GENERAL] creating tables in tablespace  (Tiffany Thang <tiffanythang@gmail.com>)
List pgsql-general
Tiffany Thang <tiffanythang@gmail.com> writes:
> According to the documentation, a table can be created in a specific
> tablespace by performing the following:
> 1. Specify the tablespace parameter in the create database statement.
> 2. Specify the tablespace parameter in the create table statement.

> I've tried both but the tablespace column in pg_tables is empty.

An empty entry in pg_tables means the table is in the database's
default tablespace, whether you made it that way implicitly or explicitly.
So this looks as-expected to me.  You'd need to spread the database across
more than one tablespace to get anything in that column.

> "show default_tablespace" is also empty.

If you didn't do anything to change that setting, that would also be
expected.  Again, the interpretation is "use the database's default
tablespace".

            regards, tom lane


pgsql-general by date:

Previous
From: Tiffany Thang
Date:
Subject: [GENERAL] creating tables in tablespace
Next
From: Tiffany Thang
Date:
Subject: Re: [GENERAL] creating tables in tablespace