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

From Tom Lane
Subject Re: Another thought about search_path semantics
Date
Msg-id 23254.1396637814@sss.pgh.pa.us
Whole thread Raw
In response to Re: Another thought about search_path semantics  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Another thought about search_path semantics  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-04-04 14:32:46 -0400, Tom Lane wrote:
>> Hm.  Seems pretty grotty, but it'd at least fix pg_dump's problem,
>> since pg_dump's lists are always "foo, pg_catalog" with no third
>> schema mentioned.  I think what we'd actually need is to say
>> "pg_catalog cannot be selected as the creation target unless it's
>> the *first* entry in the search_path list".

> I was actually suggesting that the only way to create something in
> pg_catalog is to do it with a explicit schema qualified id. I realize
> that that's not something backpatchable...

I don't find that to be a good idea at all.  pg_dump is probably not the
only code that believes it can select a creation target with search_path,
no matter what that target is.

As for back-patchability, I was initially thinking of only fixing this in
HEAD.  If the behavior change is small enough, maybe we could get away
with back-patching 9.2 and 9.3; but I don't think we should start with
the assumption that we must do that.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Another thought about search_path semantics
Next
From: Andres Freund
Date:
Subject: Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation