Re: Another thought about search_path semantics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Another thought about search_path semantics
Date: 2014-04-04 18:56:54
Message-ID: 23254.1396637814@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-04-04 19:04:03 Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation
Previous Message Andres Freund 2014-04-04 18:43:50 Re: Another thought about search_path semantics