Re: tsearch2 in PostgreSQL 8.3?f

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: josh(at)agliodbs(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: tsearch2 in PostgreSQL 8.3?f
Date: 2007-08-18 16:24:53
Message-ID: 200708181624.l7IGOra18524@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus wrote:
> Bruce,
>
> > Oh, so you want the config inside each tsvector value. ?Interesting
> > idea.
>
> Yeah, hasn't anyone suggested this before? It seems like the obvious
> solution. A TSvector constructed with en_US is NOT the same as a vector
> constructed with fr_FR and it's silly to pretend that they are comparable.
> Sticking the config name at the beginning of the field would allow for the
> use of single-parameter functions, and default_config would only be used
> for SELECT queries. Backup/restore issues should go away completely ...
>
> EXCEPT this would introduce issues if the config is changed or deleted
> after being used. However, I'd imagine that we have those anyway --
> certainly we would at restore time.

The other problem with encoding the configuration name in the tsvector
value is that pg_dump would somehow have to embed the configuration name
in the tsvector output, and I can't see that working for an expression
index because index contents aren't dumped. Having a separate
configuration column is clearly simpler.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-08-18 16:28:10 Re: tsearch2 in PostgreSQL 8.3?
Previous Message Gregory Stark 2007-08-18 15:47:58 "It'd be better if there were not an implicit cast from int8 to text..."