Re: tsearch2 - Mailing list pgsql-sql
From | Dan Feiveson |
---|---|
Subject | Re: tsearch2 |
Date | |
Msg-id | 003401c544f5$b8a95ab0$fb04030a@CCPlanet.Com Whole thread Raw |
In response to | Re: tsearch2 (Oleg Bartunov <oleg@sai.msu.su>) |
List | pgsql-sql |
Thanks Oleg! Did as you recommended: set_curcfg('default'); got new error running query containing: to_tsquery('advanced|tech');rank(avectors,a2); ERROR: ExecMakeTableFunctionResult: expression is not a function call Past message board suggests this is a pg error, not tsearch2 -- do you know of any workarounds? Thanks for all your help Oleg, Dan ----- Original Message ----- From: "Oleg Bartunov" <oleg@sai.msu.su> To: "Dan Feiveson" <danf@datajoe.com> Sent: Monday, April 18, 2005 10:13 PM Subject: Re: [SQL] tsearch2 > On Mon, 18 Apr 2005, Dan Feiveson wrote: > > > Hi Oleg, > > > > Am getting when running certain functions in tsearch2: > > > > ERROR: could not find tsearch config by locale > > > > Message boards suggest problem comes from LC_CTYPE and LC_COLLATE not being > > specifiec in cfg (which in our case they are not). Wondering what they > > should be set to and if that might affect our existing settings. > > I see no problem if you follow instructions from documentation. > A lot of people use tsearch2 and I don't believe your case is very > specific. You may, at least, use set_curcfg('your_configuration_name') > to set default configuration and show_curcfg() to see current config: > > test=# select oid,* from pg_ts_cfg; > oid | ts_name | prs_name | locale > ---------+-----------------+----------+-------------- > 6214174 | default | default | C > 6214175 | default_russian | default | ru_RU.KOI8-R > 6214176 | simple | default | > (3 rows) > > test=# select show_curcfg(); > show_curcfg > ------------- > 6214175 > (1 row) > > My default config is 'default_russian' which corresponds to my locale > setup 'ru_RU.KOI8-R' and I have no problem. If your locale is 'C', than > you should use 'default' configuration. > > test=# select set_curcfg('default'); > set_curcfg > ------------ > > (1 row) > > test=# select show_curcfg(); > show_curcfg > ------------- > 6214174 > (1 row) > > You need to grant permission to use on tseach2 configuration tables ( pg_ts_* ). > > > > > > Thanks a lot Oleg, > > > > Dan > > > > ----- Original Message ----- > > From: "Oleg Bartunov" <oleg@sai.msu.su> > > To: "Dan Feiveson" <danf@datajoe.com> > > Cc: <pgsql-sql@postgresql.org> > > Sent: Monday, April 18, 2005 4:19 PM > > Subject: Re: [SQL] tsearch2 > > > > > >> Dan, > >> > >> I don't remember what the probem you have ? > >> > >> Oleg > >> On Mon, 18 Apr 2005, Dan Feiveson wrote: > >> > >>> Hi Oleg, > >>> > >>> Still trying to get tsearch2 to work ... from archived message board it > > looks like our problem is that we don't have LC_CTYPE and LC_COLLATE > > established. > >>> > >>> We're running 7.3.4 - are there any potential pitfalls if we set > > LC_CTYPE and LC_COLLATE (in conjunction with other settings? -- We set the > > locale of C on our current configuration to allow LIKE searches to use > > indexes - will this be affected? Also what grants do we need to run to get > > a non super user working with tsearch2? > >>> > >>> Thanks again for all your help, > >>> > >>> Dan > >>> > >>> Dan Feiveson > >>> DataJoe LLC > >>> > >>> > >> > >> Regards, > >> Oleg > >> _____________________________________________________________ > >> Oleg Bartunov, sci.researcher, hostmaster of AstroNet, > >> Sternberg Astronomical Institute, Moscow University (Russia) > >> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ > >> phone: +007(095)939-16-83, +007(095)939-23-83 > >> > >> ---------------------------(end of broadcast)--------------------------- > >> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > > > Regards, > Oleg > _____________________________________________________________ > Oleg Bartunov, sci.researcher, hostmaster of AstroNet, > Sternberg Astronomical Institute, Moscow University (Russia) > Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ > phone: +007(095)939-16-83, +007(095)939-23-83