Re: Missing schema name

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Missing schema name
Дата
Msg-id 1313097390.6322.31.camel@laptop
обсуждение исходный текст
Ответ на Re: Missing schema name  (Michael Shapiro <mshapiro51@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Michael Shapiro
Дата:
Сообщение: Re: Timing out.
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Timing out.