pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #5838: tables of the same name in different schemas
3+ messages / 3 participants
[nested] [flat]
* BUG #5838: tables of the same name in different schemas
@ 2011-01-14 08:07 Tyler Kellen <tyler@sleekcode.net>
2011-01-14 11:12 ` Re: BUG #5838: tables of the same name in different schemas Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tyler Kellen @ 2011-01-14 08:07 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 5838
Logged by: Tyler Kellen
Email address: tyler@sleekcode.net
PostgreSQL version: 9.0.2
Operating system: Win7 64
Description: tables of the same name in different schemas
Details:
Given two objects of the same name in different schemas, when both schemas
are in the search_path, \d only shows the object from the first schema
listed.
Reproduction:
CREATE SCHEMA s1;
CREATE SCHEMA s2;
CREATE TABLE s1.test ( id int );
CREATE TABLE s2.test ( id int );
SET search_path TO s1,s2;
\d
SET search_path TO s2,s1;
\d
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #5838: tables of the same name in different schemas
2011-01-14 08:07 BUG #5838: tables of the same name in different schemas Tyler Kellen <tyler@sleekcode.net>
@ 2011-01-14 11:12 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-01-14 17:51 ` Re: BUG #5838: tables of the same name in different schemas Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Heikki Linnakangas @ 2011-01-14 11:12 UTC (permalink / raw)
To: Tyler Kellen <tyler@sleekcode.net>; +Cc: pgsql-bugs
On 14.01.2011 10:07, Tyler Kellen wrote:
> Given two objects of the same name in different schemas, when both schemas
> are in the search_path, \d only shows the object from the first schema
> listed.
>
> Reproduction:
> CREATE SCHEMA s1;
> CREATE SCHEMA s2;
> CREATE TABLE s1.test ( id int );
> CREATE TABLE s2.test ( id int );
> SET search_path TO s1,s2;
> \d
> SET search_path TO s2,s1;
> \d
That's intentional. \d lists the object that are currently visible in
your search_path. The object in the schema that's later in search_path
is being shadowed by the one in the first schema, so it's not visible.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #5838: tables of the same name in different schemas
2011-01-14 08:07 BUG #5838: tables of the same name in different schemas Tyler Kellen <tyler@sleekcode.net>
2011-01-14 11:12 ` Re: BUG #5838: tables of the same name in different schemas Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
@ 2011-01-14 17:51 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2011-01-14 17:51 UTC (permalink / raw)
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; +Cc: Tyler Kellen <tyler@sleekcode.net>; pgsql-bugs
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> On 14.01.2011 10:07, Tyler Kellen wrote:
>> Given two objects of the same name in different schemas, when both schemas
>> are in the search_path, \d only shows the object from the first schema
>> listed.
> That's intentional. \d lists the object that are currently visible in
> your search_path. The object in the schema that's later in search_path
> is being shadowed by the one in the first schema, so it's not visible.
You can use "\d *.*" if you want to see objects that are not visible
in the search path.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-01-14 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14 08:07 BUG #5838: tables of the same name in different schemas Tyler Kellen <tyler@sleekcode.net>
2011-01-14 11:12 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-01-14 17:51 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox