Re: text search vs schemas - Mailing list pgsql-hackers

From Tom Lane
Subject Re: text search vs schemas
Date
Msg-id 5903.1187364845@sss.pgh.pa.us
Whole thread Raw
In response to Re: text search vs schemas  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Am Freitag, 17. August 2007 05:15 schrieb Tom Lane:
>> Actually ... I'm suddenly not happy about the choice to put text search
>> configurations etc. into schemas at all.

> But that isn't different from any other part of the system.  A proper fix 
> would be a mechanism to alleviate the confusion in all places, not simply to 
> remove features that cause such confusion in some places (but not all, 
> thereby causing inconsistencies).

Well, we are already inconsistent about this.  PL languages and index
access methods, for example, don't have schema-ified names.

>> It does not seem likely that a typical installation will have so many
>> text search configs that subdividing them into schemas will really be
>> useful.

> But schemas are not only used to organize objects because there are so many.
> Altering the search path to get at a different implementation without having 
> to alter the names in every single place is also a useful application.

This is isomorphic to the argument about whether default_text_search_config
is a good idea; indeed, I think that default_text_search_config pretty
much solves this problem already, for the places where it's sane to have
the configuration-in-use depend upon context.  The problem with using
schemas for TS configs is that we can't prevent the search result from
changing in contexts where it mustn't change.  At least, not short of
requiring fully-qualified config names in those places, which doesn't
sound like an advance in usability.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: tsearch2 in PostgreSQL 8.3?
Next
From: "Luke Lonergan"
Date:
Subject: Re: tsearch2 in PostgreSQL 8.3?