Skip site navigation (1) Skip section navigation (2)

Re: search_path vs extensions

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: david(at)kineticode(dot)com ("David E(dot) Wheeler"), PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Subject: Re: search_path vs extensions
Date: 2009-05-27 20:49:42
Message-ID: 87zlcycluh.fsf@news-spur.riddles.org.uk (view raw or flat)
Thread:
Lists: pgsql-hackers
>>>>> "David" == "David E Wheeler" <david(at)kineticode(dot)com> writes:

 >> The moment you're adding specific schemas where to put extensions
 >> into, you have to adapt your search_path. Some applications
 >> already have to manage search_path for their own needs, so we're
 >> trying to avoid having those people to care about extensions
 >> schemas and application schema at the same time.

 David> That doesn't seem like much of a problem to me.

Unfortunately, the fact that something doesn't seem like much of a
problem to you doesn't actually make it less of a problem.

Splitting up search_path is something I've been thinking about for a
while (and threw out on IRC as a suggestion, which is where Dimitri
got it); it was based on actual experience running an app that set the
search path in the connection parameters in order to select which of
several different schemas to use for part (not all) of the data.  When
setting search_path this way, there is no way to set only part of it;
the client-supplied value overrides everything.

Obviously there are other possible solutions, but pretending there
isn't a problem will get nowhere.

(Setting the search path using a function or sql statement _after_
connecting was not an option; it would have confused the connection
persistance layer, which needed different parameters to tell the
connections apart.)

-- 
Andrew (irc:RhodiumToad)

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2009-05-27 21:00:21
Subject: Re: [PATCH] plpythonu datatype conversion improvements
Previous:From: Tom LaneDate: 2009-05-27 20:47:18
Subject: Re: A couple of gripes about the gettext plurals patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group