[BUGS] BUG #14578: Tables with same name in different schema are not shownwith \dt - Mailing list pgsql-bugs

From francois@teksol.info
Subject [BUGS] BUG #14578: Tables with same name in different schema are not shownwith \dt
Date
Msg-id 20170304145144.25052.11799@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14578: Tables with same name in different schema arenot shown with \dt
Re: [BUGS] BUG #14578: Tables with same name in different schemaare not shown with \dt
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14578
Logged by:          François Beausoleil
Email address:      francois@teksol.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)


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: manju.shedabal@gmail.com
Date:
Subject: [BUGS] BUG #14577: error:ppas-9.5 service already exists on your system
Next
From: Euler Taveira
Date:
Subject: Re: [BUGS] BUG #14578: Tables with same name in different schema arenot shown with \dt