Issue with listing same tablenames from different schemas in the search_path
| От | Nikhil Sontakke |
|---|---|
| Тема | Issue with listing same tablenames from different schemas in the search_path |
| Дата | |
| Msg-id | CANgU5ZenHxVLOrkA3_+6rSattKm7TJ_Xkg5hTtXPygFvV_Ow6A@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: Issue with listing same tablenames from different schemas
in the search_path
|
| Список | pgsql-hackers |
Hi, <br /><br />Consider the following sequence of commands in a psql session:<br /><br />postgres=#create table public.sample(xint);<br />postgres=#create schema new;<br />postgres=#create table new.sample(x int);<br />postgres=#setsearch_path=public,new;<br /><br />postgres=#\dt<br />Schema | Name | Type | Owner<br />-------------------------------------------<br/>public | sample | table | postgres<br />(1 row)<br /><br />We shouldhave seen two entries in the above listing. So looks like a bug to me.<br /><br />The issue is with the call to pg_table_is_visible().While scanning for the second entry, it breaks out because there is a matching entry with the samename in the first schema. What we need is a variation of this function which checks for visibility of the correspondingnamespace in the search path and emit it out too if so.<br /><br />Thoughts? I can cook up a patch for this.<br /><br />Regards,<br />Nikhils<br />
В списке pgsql-hackers по дате отправления: