On Sat, Dec 6, 2008 at 10:00 AM, Martin Marques
<[EMAIL PROTECTED]>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

Reply via email to