On Thu, Jan 2, 2020 at 12:59 PM Mahendra Singh <mahi6...@gmail.com> wrote:
> While reading code and doing some testing, I found that if we create a 
> temporary table with same name as we created a normal(global) table, then \d 
> is showing only temporary table info.

That's because the query that \d issues to the backend includes:

  AND pg_catalog.pg_table_is_visible(c.oid)

So I'd say it's not a bug, because that bit of SQL didn't get included
in the query by accident.

Whether it is the behavior that everybody wants is debatable, but I
think it's been this way since 2002. See commit
039cb479884abc28ee494f6cf6c5e7ec26b88fc8.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Reply via email to