Re: Tsearch2 - Error using tsquery object in GROUP BBY

From: Henrik Zagerholm <henke(at)mac(dot)se>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tsearch2 - Error using tsquery object in GROUP BBY
Date: 2006-12-01 09:18:11
Message-ID: C25AD428-936B-447F-92FE-A098163FC06C@mac.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


1 dec 2006 kl. 09:56 skrev Teodor Sigaev:

>> The query I'm executing has a GROUP BY clause and because I'm
>> using the headline function I need my tsquery object in the SELECT
>> clause and therefor also in the GROUP BY clause.
>> BUT when executing the query I get the following error. -> "could
>> not identify an ordering operator for type tsquery"
>
> Which version do you use? Only 8.2 will have comparison operator
> for tsquery.
I'm using 8.1.4 at the moment but I guess I need to update. The 8.2
is looking really promising. So with 8.2 I don't need the subselect?
>
>> How do I solve this?
> Use subselect:
> SELECT *, headline(..., to_tsquery()) FROM
> {
> SELECT .... GROUP BY ...
> );
Thanks I'll try it.
>
> BTW, for performance reason, it might be useful to use limit in
> inner select -
> headline function is slow enough.
You think?! ;)
Thanks again for your quick reply.
Cheers, Henrik
>
>
> --
> Teodor Sigaev E-mail:
> teodor(at)sigaev(dot)ru
> WWW: http://
> www.sigaev.ru/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-12-01 09:40:38 Re: initdb problem on Windows XP Home
Previous Message Matthew Peter 2006-12-01 09:01:54 named cache