Re: Missing schema name - Mailing list pgadmin-support

From Guillaume Lelarge
Subject Re: Missing schema name
Date
Msg-id 1313097390.6322.31.camel@laptop
Whole thread Raw
In response to Re: Missing schema name  (Michael Shapiro <mshapiro51@gmail.com>)
List pgadmin-support
On Thu, 2011-08-11 at 14:38 -0500, Michael Shapiro wrote:
> I have multiple schemas in my database. I do not have a search_path set for
> the database (so it wouold use the default: $user,public
> When I look at any table in any of the schemas, the table name has the
> schema prepended to it.
> 
> If it isn't PgAdmin doing it, then it must be in the Pg server itself.
> How does PgAdmin get the DDL for a table from the server?
> 

pgAdmin doesn't get the DDL, it builds it from all the properties it
grabed in the system catalog. What's more interesting is how it gets the
default schema. It's the first valid one in the search_path parameter
(with one caveat, if you have $user in your search_path, pgadmin will
replace it with your username, and check if it's a valid schema name).
So, IOW, with search_path=a,$user,b,c,d,e, and connection as guillaume,
with no a and guillaume schemas, but an existing c schema, the default
schema will be c. Every object with this schema won't have their schema
name prepended. Every other object will have.


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com



pgadmin-support by date:

Previous
From: Michael Shapiro
Date:
Subject: Re: Timing out.
Next
From: Guillaume Lelarge
Date:
Subject: Re: Timing out.