Re: Strange "missing tables" problem - Mailing list pgsql-general

From Denis BUCHER
Subject Re: Strange "missing tables" problem
Date
Msg-id 4A924D8D.1090502@hsolutions.ch
Whole thread Raw
In response to Re: Strange "missing tables" problem  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Strange "missing tables" problem  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: Strange "missing tables" problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hello,

Guillaume Lelarge a écrit :
>> I have a strange problem since I moved some tables to a schema, some
>> tables are missing from the list (with \d or \dt) but they are still
>> present anyway ???!!!!!
>>
>> Example :
>>> $ psql mybase
>>> Bienvenue dans psql 8.1.17, l'interface interactive de PostgreSQL.
>>> Saisissez:
>>> mybase=#
>>> bw_rma=# \dt
>>>                         Liste des relations
>>>      Schéma      |           Nom            | Type  | Propriétaire
>>> -----------------+--------------------------+-------+--------------
>>>  import          | rebates_products         | table | postgres
>>>  import          | rebates_customers        | table | postgres
>>>  rma             | categories               | table | postgres
>>>  rma             | customers                | table | postgres
>>>  rma             | defauts                  | table | postgres
>>>  rma             | providers                | table | postgres
>> No trace of my import.clients table ?????
>>
>> But if I do :
>>> bw_rma=# SELECT count(*) FROM import.customers;
>>>  count
>>> -------
>>>  86703
>>> (1 ligne)
>> My table is there and I can access it !!!
>>
>> Any hint or help would be greatly appreciated !
>>
>> I can do without it but, it's a little strange not to be able to list
>> the objects present in the database...
>>
>
> \d does not show all the objects available in the database. If one is
> available in schema A and in schema B, it will be displayed at most once,
> depending on your search_path configuration.
>
> I suppose you have something like 'rma, import, ...' for search_path, so it
> only displays rma.customers and not impor.customers.

Yes that's correct. Therefore my "problem" is the "normal" behavior of
\dt. But "normal" means "expected". But I don't find it very
secure/handy, because you expect to see all your tables. Is there a way
to change the behavior of \dt so that it lists ALL tables present in
search path ?

Thanks a lot for your help

Denis

pgsql-general by date:

Previous
From: Denis BUCHER
Date:
Subject: Re: Strange "missing tables" problem
Next
From: Fred Janon
Date:
Subject: How to create a multi-column index with 2 dates using 'gist'?