Issue with listing same tablenames from different schemas in the search_path - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Issue with listing same tablenames from different schemas in the search_path
Date
Msg-id CANgU5ZenHxVLOrkA3_+6rSattKm7TJ_Xkg5hTtXPygFvV_Ow6A@mail.gmail.com
Whole thread Raw
Responses Re: Issue with listing same tablenames from different schemas in the search_path
List 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 by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Range Types - typo + NULL string constructor
Next
From: Heikki Linnakangas
Date:
Subject: Re: Issue with listing same tablenames from different schemas in the search_path