Re: Another thought about search_path semantics - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Another thought about search_path semantics
Date
Msg-id 20140404181709.GC26295@awork2.anarazel.de
Whole thread Raw
In response to Re: Another thought about search_path semantics  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Another thought about search_path semantics
List pgsql-hackers
On 2014-04-04 14:13:43 -0400, Tom Lane wrote:
> > How about simply refusing to create anything in pg_catalog unless it's
> > explicitly schema qualified? Looks a bit nasty to implement but doable?
> 
> That's what happens already.  The point is to do better.  What we want
> for pg_dump's case is to get a complaint that schema foo doesn't exist,
> *not* an attempt to create in pg_catalog.  That's what you got (though
> at the SET command not the CREATE command) in all versions before 9.2.

I was thinking - but not saying explicitly - of rigging things so that
pg_catalog is ignored when searching for the target schema for object
creation unless explicitly specified. So if there's no other schema in
the search path you'd get the error about no "no schema has been
selected to create in", even if pg_catalog is somewhere in there.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Another thought about search_path semantics
Next
From: Tom Lane
Date:
Subject: Re: Another thought about search_path semantics