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

From: François Beausoleil <francois(at)teksol(dot)info>
To: Euler Taveira <euler(at)timbira(dot)com(dot)br>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14578: Tables with same name in different schema are not shown with \dt
Date: 2017-03-04 16:33:17
Message-ID: 86134228-E342-4838-B65D-82E3F987E2AB@teksol.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


> Le 4 mars 2017 à 10:10, Euler Taveira <euler(at)timbira(dot)com(dot)br> a écrit :
>
> On 04-03-2017 11:51, francois(at)teksol(dot)info wrote:
>> 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.
>>
> It is not a bug. It is a documented behavior [1].
>
> "An object is said to be visible if its containing schema is in the
> search path and no object of the same kind and name appears earlier in
> the search path."
>
>
> [1] https://www.postgresql.org/docs/9.6/static/app-psql.html

Oh, OK. That was surprising. I don't usually have tables with the same name in different schemas.

Thanks for the quick replies!
François

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message koronabora 2017-03-04 18:17:02 BUG #14579: pgAdmin 4.1 bug
Previous Message Fabien COELHO 2017-03-04 15:20:58 Re: BUG #14578: Tables with same name in different schema are not shown with \dt