Re: [BUGS] BUG #14578: Tables with same name in different schemaare not shown with \dt
От | Fabien COELHO |
---|---|
Тема | Re: [BUGS] BUG #14578: Tables with same name in different schemaare not shown with \dt |
Дата | |
Msg-id | alpine.DEB.2.20.1703041604150.30598@lancre обсуждение исходный текст |
Ответ на | [BUGS] BUG #14578: Tables with same name in different schema are not shownwith \dt (francois@teksol.info) |
Список | pgsql-bugs |
Hello François, > 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. From the source code this this is a somehow debatable but voluntary feature. The query explicitely checks whether the table is visible: ... AND pg_catalog.pg_table_is_visible(c.oid) That is whether it is ahead in the path, so the second one is masked, as doc says: """ Whenever the pattern parameter is omitted completely, the \d commands display all objects that are visible in the current schema search path — this is equivalent to using * as the pattern. (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. This is equivalent to the statement that the object can be referenced by name without explicit schema qualification.) To see all objects in the database regardless of visibility, use *.* as the pattern. """ Now ISTM that "psql" documentation could be clearer: the explanation is hidden within the "pattern" description... Note that the visibility filtering cannot be removed easily, because then the ordering (currently schema/name) would have to be fixed as well, and people would be surprised somehow by the resulting display... -- Fabien. -- 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 по дате отправления: