About psql \dt unable display same name table which have different schema
От | 徐志宇徐 |
---|---|
Тема | About psql \dt unable display same name table which have different schema |
Дата | |
Msg-id | CAOCebiKq7fmsGr36ON5_Fru2dQJBB6NY3m_NnLs94CbUek=AZg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: About psql \dt unable display same name table which have different schema
|
Список | pgsql-general |
Hello All
I experience a problem. The psql \dt command unable display
same name table which have different schema.
The table new. test10 unable display.
Owing to the public.test10 exist. The pg_type_is_visible display "F"
I don't know why this problem exist. Why unable display both table " public.test10 、 new. test10 "
For example:
new01=# create table public.test10 (id int);
CREATE TABLE
new01=# create table new.test10(id int);
CREATE TABLE
new01=# create table new.test11(id int);
CREATE TABLE
new01=# show search_path ;
search_path
----------------------------
"$user", public, new2, new
(1 row)
new01=# \dt
List of relations
Schema | Name | Type | Owner
--------+--------+-------+----------
new | test01 | table | test01
new | test02 | table | postgres
new | test11 | table | postgres
public | tbl_a | table | postgres
public | tbl_c | table | postgres
public | test10 | table | postgres
(6 rows)
CREATE TABLE
new01=# create table new.test10(id int);
CREATE TABLE
new01=# create table new.test11(id int);
CREATE TABLE
new01=# show search_path ;
search_path
----------------------------
"$user", public, new2, new
(1 row)
new01=# \dt
List of relations
Schema | Name | Type | Owner
--------+--------+-------+----------
new | test01 | table | test01
new | test02 | table | postgres
new | test11 | table | postgres
public | tbl_a | table | postgres
public | tbl_c | table | postgres
public | test10 | table | postgres
(6 rows)
new01=# SELECT pg_type_is_visible('public.test10'::regtype);
pg_type_is_visible
--------------------
t
(1 row)
new01=# SELECT pg_type_is_visible('new.test10'::regtype);
pg_type_is_visible
--------------------
f
(1 row)
pg_type_is_visible
--------------------
t
(1 row)
new01=# SELECT pg_type_is_visible('new.test10'::regtype);
pg_type_is_visible
--------------------
f
(1 row)
В списке pgsql-general по дате отправления: