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 20140404174708.GK17307@awork2.anarazel.de
Whole thread Raw
In response to Another thought about search_path semantics  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Another thought about search_path semantics
List pgsql-hackers
Hi,

On 2014-04-04 13:33:59 -0400, Tom Lane wrote:
> It strikes me that the real issue here is that the analogy to PATH is
> fine for search_path's role as a *search* path, but it's not so good for
> determining the creation target schema.  I wonder if we should further
> redefine things so that the creation target schema is always the first
> thing named in search_path, and if that doesn't exist, we throw an
> error rather than silently creating in some schema further down the
> list.

Wouldn't that devolve into an even messier behaviour because of the
historical "$user",public search path?

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.

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Another thought about search_path semantics
Next
From: Tom Lane
Date:
Subject: Re: Another thought about search_path semantics