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:13:43
Message-ID: 22181.1396635223@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 13:58:53 -0400, Tom Lane wrote:
>> Hm ... doesn't fix the problem for existing dump files, which are going to
>> say "search_path = foo, pg_catalog". However, we could modify it a bit,
>> so that the marker is put on schemas that can be skipped if missing for
>> creation purposes. Then the default could look like "search_path =
>> !$user, public", while we still get safe behavior for pg_dump's commands.

> Unfortunately the curren tsearch_path is probably enshrined in a couple
> of thousand postgresql.confs...

Uncommented? Anyway, we never have and never will promise that you don't
have to revisit your postgresql.conf during a major version upgrade.

> 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-04-04 18:17:09 Re: Another thought about search_path semantics
Previous Message Andres Freund 2014-04-04 18:05:11 Re: Another thought about search_path semantics