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

Поиск
Список
Период
Сортировка
От Diego Schulz
Тема Re: posible BUG on psql... or maybe worst
Дата
Msg-id 47dcfe400812060518x4f72a533p1d248eeca2704ff1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: posible BUG on psql... or maybe worst  (Martin Marques <martin@marquesminen.com.ar>)
Ответы Re: posible BUG on psql... or maybe worst  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-general


On Sat, Dec 6, 2008 at 10:00 AM, Martin Marques <martin@marquesminen.com.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Martin Marques
Дата:
Сообщение: Re: posible BUG on psql... or maybe worst
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: visibility map - what do i miss?