Re: text search vs schemas

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: text search vs schemas
Date: 2007-08-17 05:10:29
Message-ID: Pine.LNX.4.64.0708170906090.18739@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 16 Aug 2007, Tom Lane wrote:

> I wrote:
>> We can't put tsvector_update_trigger() into core in anything like its
>> current form. As is, it will take an unqualified function name, look
>> it up, and call it. The prospects for subversion by search path
>> manipulation are obvious, and even if you aren't concerned about
>> malicious attacks, the effects of the trigger are context-dependent
>
> Actually ... I'm suddenly not happy about the choice to put text search
> configurations etc. into schemas at all. We've been sitting here and
> assuming that to_tsvector('english', my_text_col) has a well defined
> meaning --- but as the patch stands, *it does not*. The interpretation
> of the config name could easily change depending on search_path.

what's wrong with schema-qualified name ?

>
> 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. If I recall correctly, Teodor did that on my recommendation

it's useful.

> that it'd be the cleanest way to distinguish built-in from non-built-in
> objects for dump purposes. That is, pg_dump would ignore TS objects

I think you're wrong here. Schema often used to save connections and it's
natural to have different searches in different schemes.

> that are in pg_catalog and dump everything else. But I'm having severe
> second thoughts about that.
>
> What seems the most attractive alternative at the moment is to have a
> flat namespace for TS objects (no schemas) and introduce something like
> a "bool is_built_in" column for pg_dump to consult in deciding whether
> to dump 'em.
>
> Comments?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-08-17 05:16:22 Re: text search vs schemas
Previous Message Gregory Stark 2007-08-17 04:44:38 Re: text search vs schemas