pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15072: Unable to get tablespace from pg_tables for new created table
2+ messages / 2 participants
[nested] [flat]

* BUG #15072: Unable to get tablespace from pg_tables for new created table
@ 2018-02-18 09:52 PG Bug reporting form <noreply@postgresql.org>
  2018-02-18 12:11 ` Re: BUG #15072: Unable to get tablespace from pg_tables for new created table Sergei Kornilov <sk@zsrv.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2018-02-18 09:52 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: rhemandaddy@googlemail.com

The following bug has been logged on the website:

Bug reference:      15072
Logged by:          rheman pessek
Email address:      rhemandaddy@googlemail.com
PostgreSQL version: 10.2
Operating system:   ubuntu server 16.04.3
Description:        

Hi everyone.
I have created tablespace.

sudo mkdir /tbs_data
sudo chown -R postgres:postgres  /tbs_data
su - postgres
create tablespace tbs_data location ‘/tbs_data’;

Then I have create database and tables on that tablespace.

create database gescom_bis tablespace tbs_data;
\c gescom_bis;
SET default_tablespace = 'tbs_data';
create table voiture_bis (num int) tablespace tbs_data;


But when I run this the following query I have ans empty (blank result)

select tablespace from pg_tables where tablename='voiture_bis';

hence the tablespace name is not displayed.

But went I run the following query, everythins seams to work.

select oid from pg_database where datname = 'gescom_bis';
select relfilenode from pg_class where relname = 'voiture_bis';


Best ragrd.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #15072: Unable to get tablespace from pg_tables for new created table
  2018-02-18 09:52 BUG #15072: Unable to get tablespace from pg_tables for new created table PG Bug reporting form <noreply@postgresql.org>
@ 2018-02-18 12:11 ` Sergei Kornilov <sk@zsrv.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Sergei Kornilov @ 2018-02-18 12:11 UTC (permalink / raw)
  To: rhemandaddy@googlemail.com <rhemandaddy@googlemail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

Hello
It may confused, but works as documented: https://www.postgresql.org/docs/current/static/view-pg-tables.html
tablespace field is "null if default for database"
According "create database gescom_bis tablespace tbs_data;" your tablespace tbs_data is default for this database.

regards, Sergei




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-02-18 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-18 09:52 BUG #15072: Unable to get tablespace from pg_tables for new created table PG Bug reporting form <noreply@postgresql.org>
2018-02-18 12:11 ` Sergei Kornilov <sk@zsrv.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox