X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7054A53462 for ; Tue, 19 Apr 2005 14:43:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98823-02 for ; Tue, 19 Apr 2005 17:43:21 +0000 (GMT) Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8253D538D8 for ; Tue, 19 Apr 2005 14:43:12 -0300 (ADT) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.13.4/8.13.4) with ESMTP id j3JHh2Ut005586; Tue, 19 Apr 2005 21:43:03 +0400 (MSD) Date: Tue, 19 Apr 2005 21:43:02 +0400 (MSD) From: Oleg Bartunov X-X-Sender: megera@ra.sai.msu.su To: Dan Feiveson Cc: pgsql-sql@postgresql.org Subject: Re: tsearch2 In-Reply-To: <003401c544f5$b8a95ab0$fb04030a@CCPlanet.Com> Message-ID: References: <00f501c5445c$530fc6b0$fb04030a@CCPlanet.Com> <013101c54467$c58d9e00$fb04030a@CCPlanet.Com> <003401c544f5$b8a95ab0$fb04030a@CCPlanet.Com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.335 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200504/295 X-Sequence-Number: 21188 On Tue, 19 Apr 2005, Dan Feiveson wrote: > 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? > upgrade your postgresql > Thanks for all your help Oleg, > > Dan > > > ----- Original Message ----- > From: "Oleg Bartunov" > To: "Dan Feiveson" > 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" >>> To: "Dan Feiveson" >>> Cc: >>> 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 > 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