From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Simplifying Text Search |
Date: | 2007-11-14 22:49:19 |
Message-ID: | Pine.LNX.4.64.0711150148160.7787@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 14 Nov 2007, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> Yes, this the same problem we had months ago trying to improve the
>> syntax, that there was no easy syntax that covered all common use cases.
>
> The thing that we keep coming up against is that we'd like queries to
> be able to depend on default_text_search_config. Quite aside from
> anyone's personal opinions about whether operator or function syntax
> is preferable, it would clearly be desirable to be able to say
>
> ... WHERE textcolumn @@ 'pattern-constant'
>
> and get a fast full-text search that's governed by the current setting
> of default_text_search_config (of course, it can only be fast if there
> is an index using that same configuration, but that's a setup detail).
>
> It strikes me that now that we have an invalidatable plan cache,
> we could fix this by having the planner rewrite "textcolumn @@ something"
> into "to_tsvector(regconfig_constant, textcolumn) @@ something",
> so long as it marked the resulting plan as needing to be invalidated
> by any change in the value of default_text_search_config. Once you
> have that form, it can be matched against an index, and away you go.
>
> Too late for 8.3, but seems doable enough for 8.4.
cute, pity it's didn't come up in our early discussion
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>
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
From | Date | Subject | |
---|---|---|---|
Next Message | Trevor Talbot | 2007-11-14 22:50:20 | Re: Spinlock backoff algorithm |
Previous Message | Trevor Talbot | 2007-11-14 22:41:37 | Re: Simplifying Text Search |