Skip site navigation (1) Skip section navigation (2)

Re: Missing schema name

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Michael Shapiro <mshapiro51(at)gmail(dot)com>
Cc: "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com>, "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Missing schema name
Date: 2011-08-11 21:16:30
Message-ID: 1313097390.6322.31.camel@laptop (view raw, whole thread or download thread mbox)
Lists: 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.


In response to

pgadmin-support by date

Next:From: Guillaume LelargeDate: 2011-08-11 21:17:10
Subject: Re: Timing out.
Previous:From: Michael ShapiroDate: 2011-08-11 21:10:08
Subject: Re: Timing out.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group