Re: \d is not showing global(normal) table info if we createtemporary table with same name as global table

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: \d is not showing global(normal) table info if we createtemporary table with same name as global table
Дата
Msg-id CA+TgmoYiebnrAb+h=_gC8oU7m0vu7dLEMDcVaTm+BFhY6gPN=g@mail.gmail.com
обсуждение исходный текст
Ответ на \d is not showing global(normal) table info if we create temporarytable with same name as global table  (Mahendra Singh <mahi6run@gmail.com>)
Ответы Re: \d is not showing global(normal) table info if we create temporary table with same name as global table
Список pgsql-hackers
On Thu, Jan 2, 2020 at 12:59 PM Mahendra Singh <mahi6run@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: backup manifests
Следующее
От: Tom Lane
Дата:
Сообщение: Re: \d is not showing global(normal) table info if we create temporary table with same name as global table