Re: Another thought about search_path semantics

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

On 2014-04-04 13:58:53 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-04 18:13:43 Re: Another thought about search_path semantics
Previous Message Josh Berkus 2014-04-04 18:02:56 Re: Another thought about search_path semantics