Re: Avoiding empty queries in tsearch

From: "Doug Cole" <doug(at)shackprices(dot)com>
To: "Teodor Sigaev" <teodor(at)sigaev(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Avoiding empty queries in tsearch
Date: 2007-01-15 18:36:56
Message-ID: 7b8d80330701151036y6319cea7o84bfa7cc7c07d4f7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That sounds perfect, but it doesn't seem to exist on either of the
postgresql installations I have access to (8.1 on ubuntu and fedora core).
Is it new to 8.2? Is there a similar function under 8.1, or at least a
decent work-around? Thanks for the help,
Doug

On 1/15/07, Teodor Sigaev <teodor(at)sigaev(dot)ru> wrote:
>
> contrib_regression=# select numnode( plainto_tsquery('the any') );
> NOTICE: query contains only stopword(s) or doesn't contain lexeme(s),
> ignored
> numnode
> ---------
> 0
> (1 row)
>
> contrib_regression=# select numnode( plainto_tsquery('the table') );
> numnode
> ---------
> 1
> (1 row)
>
> contrib_regression=# select numnode( plainto_tsquery('long table') );
> numnode
> ---------
> 3
> (1 row)
>
>
> --
> Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
> WWW:
> http://www.sigaev.ru/
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-01-15 18:41:04 Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Previous Message Demitri Muna 2007-01-15 18:34:43 Re: Glacially slow nested SELECT