Re: posible BUG on psql... or maybe worst

From: "Diego Schulz" <dschulz(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: posible BUG on psql... or maybe worst
Date: 2008-12-06 13:18:49
Message-ID: 47dcfe400812060518x4f72a533p1d248eeca2704ff1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Dec 6, 2008 at 10:00 AM, Martin Marques
<martin(at)marquesminen(dot)com(dot)ar>wrote:

> Diego Schulz escribió:
>
>>
>>
>> Hi,
>>
>>
>> Schemas are a lot like directories at operating system level (except that
>> can't be nested).
>> When you ls (or dir) in /home/martin/ , normally you don't expect to see
>> /home/johnny/ listed as well.
>>
>> But if you really want to see all tables, try adjusting search_path like
>> this:
>>
>> SET search_path to myschema1,myschema2,public;
>>
>> Then it should list all relations as you expect.
>>
>>
> Sorry, forgot to say that I SET search_path acordinlly to see relations
> from both schemas. But whan the table has the same name I only get the one
> from the first schema in the search_path.
>

I can confirm the behaviour you described.

\dt+ *.contactos
List of relations
Schema | Name | Type | Owner | Description
--------+-----------+-------+---------+-------------
prueba | contactos | table | dschulz |
public | contactos | table | dschulz |

dschulz=# \dt+
List of relations
Schema | Name | Type | Owner | Description
-----------+----------------------------+-------+------------+-------------
prueba | contactos | table | dschulz |
public | bitacora | table | dschulz |
public | documentos | table | dschulz |
public | documentos_tipos | table | dschulz |
... (snip) ...

(no table public.contactos listed here)

dschulz=# select version();
version
-------------------------------------------------------------------------------------------------
PostgreSQL 8.3.5 on i386-portbld-freebsd7.1, compiled by GCC cc (GCC) 4.2.1
20070719 [FreeBSD]
(1 row)

But you can always use

\dt+ *.

to list all relations in all schemas.

cheers

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2008-12-06 13:38:43 Re: visibility map - what do i miss?
Previous Message Martin Marques 2008-12-06 13:00:25 Re: posible BUG on psql... or maybe worst