BUG #14578: Tables with same name in different schema are not shown with \dt

From: francois(at)teksol(dot)info
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14578: Tables with same name in different schema are not shown with \dt
Date: 2017-03-04 14:51:44
Message-ID: 20170304145144.25052.11799@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: 14578
Logged by: François Beausoleil
Email address: francois(at)teksol(dot)info
PostgreSQL version: 9.6.2
Operating system: Mac OS 10.11.6
Description:

In my schema, I happen to have two tables in different schemas with the same
name. PG supports that no problem, but when I listed the tables using \dt
and the search path set to both schemas, I expected to see the two tables.
Sadly, that wasn't the case.

https://gist.github.com/francois/2db220bd197492d02e0b60224a7576ac

-- repro.sql
create schema mybank;
create table public.a();
create table mybank.a();
set search_path to public;
\dt
set search_path to mybank;
\dt
set search_path to mybank, public;
\dt
set search_path to public, mybank;
\dt

-- run
$ psql --no-psqlrc --quiet repro -f b.sql
List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
public | a | table | francois
(1 row)

List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
mybank | a | table | francois
(1 row)

List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
mybank | a | table | francois
(1 row)

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira 2017-03-04 15:10:36 Re: BUG #14578: Tables with same name in different schema are not shown with \dt
Previous Message manju.shedabal 2017-03-04 10:21:28 BUG #14577: error:ppas-9.5 service already exists on your system