\dt vs schemas

From: Francisco Reyes <lists(at)natserv(dot)com>
To: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: \dt vs schemas
Date: 2003-02-28 22:31:39
Message-ID: 20030228172432.B5444-100000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just started using schemas recently.
Should one be able to see tables with the same name in different schemas
if both schemas are in the search_path?

So if I had table_1 and table_2 in schema_1 and schema_2, should I be able
to see:
Schema | Name | Type | Owner
--------+-------------+-------+-------
schema1| table_1 | table | pgsql
schema1| table_2 | table | pgsql
schema2| table_1 | table | pgsql
schema2| table_2 | table | pgsql
(sample \dt typed by hand, not result of doing in system)

Currently I have some tables with same name which I was just moving to a
schema. Used select into to copy them to the new schema, but from that
point on, only 1 set of tables are visible. The set listed in the first
schema in the search path is the one that displays.

If I do "\dt schema2." I can see the additional tables not listed by the
plain \dt fine.

Running 7.3.2 on Freebsd 4.7 Stable.

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2003-02-28 22:44:57 Re: reindex vs. drop index , create index
Previous Message Dmitry Tkach 2003-02-28 22:30:02 Re: Recreating a primary key