Re: pg_castalog.pg_tables does not show the real tablespace for tables - Mailing list pgsql-admin

From Tom Lane
Subject Re: pg_castalog.pg_tables does not show the real tablespace for tables
Date
Msg-id 1461.1239114826@sss.pgh.pa.us
Whole thread Raw
In response to pg_castalog.pg_tables does not show the real tablespace for tables  ("J. Carlos Muro" <murojc@gmail.com>)
List pgsql-admin
"J. Carlos Muro" <murojc@gmail.com> writes:
> I have created a tablespace and a database in that tablespace:

> create tablespace tb_user location '/data/tb_user';
> create database mydatabase tablespace "tb_user";
> \c mydatabase;
> create table a_table (id bigint, name text);

> I supposed that "a_table" should be in the tablespace "tb_user" as the
> database was created to use it by default. But I doesnt seem like that when
> i state the next:

The database's default tablespace is never named explicitly in pg_tables
nor in the underlying pg_class catalog.  This is intentional to make it
easier to move a database to a different default tablespace.

            regards, tom lane

pgsql-admin by date:

Previous
From: "J. Carlos Muro"
Date:
Subject: pg_castalog.pg_tables does not show the real tablespace for tables
Next
From: "Charles N. Charotti"
Date:
Subject: Text vs. Varchar talking about performance