BUG #14317: psql \dt not working as expected

From: lucian(dot)ciufudean(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14317: psql \dt not working as expected
Date: 2016-09-08 15:40:03
Message-ID: 20160908154003.1410.72854@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14317
Logged by: Lucian Ciufudean
Email address: lucian(dot)ciufudean(at)gmail(dot)com
PostgreSQL version: 9.5.4
Operating system: windows 7 x64
Description:

If one creates a table with the same name as one of the pg_catalog tables

1. CREATE TABLE pg_tables (
name varchar(80),
location point
);

then \dt will not show it:

List of relations
Schema | Name | Type | Owner
--------+--------+-------+----------
public | cities | table | postgres
(1 row)

while this query will:

select * from pg_tables;

Expectations: \dt shows all tables in the public schema.

Note that it is also unexpected that this query:

select * from pg_tables;

goes to pg_catalog.pg_tables instead of public.pg_tables.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2016-09-08 15:46:42 Re: BUG #14317: psql \dt not working as expected
Previous Message Tom Lane 2016-09-08 14:05:28 Re: BUG #14315: pg_dump --no-tablespaces doesn't do it's job when --create specified