Re: Unexpected behavior from psql

Поиск
Список
Период
Сортировка
От Tim Hart
Тема Re: Unexpected behavior from psql
Дата
Msg-id 7ABD6578-4099-4114-A930-5FA41F1AD773@mac.com
обсуждение исходный текст
Ответ на Re: Unexpected behavior from psql  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Unexpected behavior from psql
Список pgsql-general
On Jan 11, 2009, at 4:41 PM, Jeff Davis wrote:

> On Sun, 2009-01-11 at 15:33 -0600, Tim Hart wrote:
>> tjhart=# set search_path to foo, public;
>> SET
>> tjhart=# \d
>>           List of relations
>>  Schema |   Name    | Type  | Owner
>> --------+-----------+-------+--------
>>  foo    | bar_table | table | tjhart
>>  foo    | foo_table | table | tjhart
>> (2 rows)
>>
>> tjhart=# set search_path to public, foo;
>> SET
>> tjhart=# \d
>>           List of relations
>>  Schema |   Name    | Type  | Owner
>> --------+-----------+-------+--------
>>  foo    | bar_table | table | tjhart
>>  public | foo_table | table | tjhart
>> (2 rows)
>
> This behavior seems consistent to me. If you type an unqualified name
> like:
>
> SELECT * FROM foo_table;
>
> You'll get the one from the first namespace listed in search_path. It
> makes sense for "\d" to display only the tables that can be seen
> without
> specifying a fully-qualified name.
>
> Regards,
>     Jeff Davis


Would it be worthwhile to specify this in the documentation? One of
the sources of my confusion was the following statement:

http://www.postgresql.org/docs/8.3/interactive/app-psql.html:

\distvS
"... to obtain a listing of all the matching objects..."

I fully understand that 'foo' would need to be qualified when used in
sql, pl/pgsql, etc.

I understood the documentation to read that all tables, views, and
sequences in the search path would be listed, not just those unobscured.

Tim


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Unexpected behavior from psql
Следующее
От: "Phoenix Kiula"
Дата:
Сообщение: Smartest way to resize a column?