Re: Operators and schemas - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Operators and schemas
Date
Msg-id 3136.1018907733@sss.pgh.pa.us
Whole thread Raw
In response to Re: Operators and schemas  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Operators and schemas  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> I imagine that pg_dump could be able to figure out that certain references
> would be "local", so no explicit schema qualification is necessary.

Well, if it makes assumptions about the path then it can do that ... or
I guess it could explicitly set the path, and then it knows.  Yeah, that
will probably work well enough.  Okay, good ... the question of what
pg_dump should do about qualifying names was bugging me.

What I'm now envisioning is that pg_dump will explicitly setset search_path = 'foo';
when dumping or reloading schema foo.  Given the present semantics of
search_path, that will imply an implicit search of pg_catalog before
foo.  Therefore, we have the following ground rules for schema
qualification in pg_dump:* System (pg_catalog) names never need qualification.* Names in the current schema need be
qualifiedonly if they  conflict with system names.* Cross-references to other schemas will always be qualified.
 

This seems workable.  Thoughts?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Operators and schemas
Next
From: Tom Lane
Date:
Subject: Re: regression in CVS HEAD