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

Re: default_text_search_config and expression indexes

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paesold <mpaesold(at)gmx(dot)at>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: default_text_search_config and expression indexes
Date: 2007-07-31 02:37:32
Message-ID: 20070731023732.GX7628@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-advocacypgsql-hackers
Bruce Momjian wrote:
> Bruce Momjian wrote:

> > 	3) Remove default_text_search_config and require the
> > 	   configuration to be specified in each function call.
> > 
> > If we remove default_text_search_config, it would also make ::tsvector
> > casting useless as well.
> 
> OK, I just found a case that I think is going to make #3 a requirement
> (remove default_text_search_config).
> 
> How is a CREATE INDEX ... to_tsvector(col) going to restore from a
> pg_dump?  I see no way of guaranteeing that the
> default_text_search_config is correct on the restore, and in fact I
> don't think we have any way of knowing the default_text_search_config
> used for the index.

Make pg_dump emit only CREATE INDEX sentences with two-param format.  In
fact I think it would make sense to convert internally the one-param
format to two-param, before hitting the catalogs.

This would also solve your problem about usability of WHERE clauses, if
you rewrite the one-param calls to two-params before the optimizer kicks
in.

-- 
Alvaro Herrera                 http://www.amazon.com/gp/registry/DXLWNGRJD34J
"Nadie esta tan esclavizado como el que se cree libre no siendolo" (Goethe)

In response to

Responses

pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2007-07-31 02:39:29
Subject: Re: Quick idea for reducing VACUUM contention
Previous:From: Devrim GÜNDÜZDate: 2007-07-31 02:25:14
Subject: Re: Machine available for community use

pgsql-advocacy by date

Next:From: Bruce MomjianDate: 2007-07-31 02:47:16
Subject: Re: default_text_search_config and expression indexes
Previous:From: Decibel!Date: 2007-07-31 02:18:03
Subject: Fwd: [cbp] New MySQL Journal

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