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 20140404180511.GA26295@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  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-04-04 13:58:53 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > I wonder if we could extend the search path syntax to specify whether a
> > schema should be used for creation of objects or not. Sounds somewhat
> > nasty, but I don't really have a better idea :(. Something like
> > search_patch=public,!pg_catalog.
> 
> 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...

How about simply refusing to create anything in pg_catalog unless it's
explicitly schema qualified? Looks a bit nasty to implement but doable?

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Костя Кузнецов
Date:
Subject: gsoc knn spgist
Next
From: Tom Lane
Date:
Subject: Re: Another thought about search_path semantics