Re: search_path for schemas

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ferruccio Zamuner <nonsolosoft(at)diff(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: search_path for schemas
Date: 2003-03-20 15:04:42
Message-ID: 23128.1048172682@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ferruccio Zamuner <nonsolosoft(at)diff(dot)org> writes:
> there is something wrong into use of search_path and psql "\d" command.

No, there isn't...

> I think to see following result there instead:
> List of relations
> Schema | Name | Type | Owner
> --------+--------+-------+-------
> first | simple | table | fer
> second | simple | table | fer
> third | simple | table | fer

You will not see that because first.simple is blocking your view of the
similarly-named tables behind it in the search path --- that is, if you
did "select * from simple" here, you'd get first.simple, not
second.simple nor third.simple. The only way to get at the latter two
is to explicitly give the schema name, which means they are effectively
not in your search path.

Plain \d is defined to show you only tables that are visible in your
search path, and not clutter the display with those that aren't.
You can use something like \d *.* if you want to see all tables without
regard to search path.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kurt Overberg 2003-03-20 15:15:03 Re: Big insert/delete memory problems
Previous Message James Gregory 2003-03-20 14:35:01 trigger troubles