Re: Another thought about search_path semantics

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Another thought about search_path semantics
Date: 2014-04-04 18:17:09
Message-ID: 20140404181709.GC26295@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-04 18:20:52 Re: Another thought about search_path semantics
Previous Message Tom Lane 2014-04-04 18:13:43 Re: Another thought about search_path semantics