Re: Unexpected behavior from psql

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tim Hart <tjhart(at)mac(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unexpected behavior from psql
Date: 2009-01-11 22:41:24
Message-ID: 1231713684.32466.4.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Hart 2009-01-11 23:13:13 Re: Unexpected behavior from psql
Previous Message Tim Hart 2009-01-11 21:33:28 Unexpected behavior from psql