Re: Checking is TSearch2 query is valid

From: Benjamin Arai <me(at)benjaminarai(dot)com>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Checking is TSearch2 query is valid
Date: 2007-09-09 06:07:42
Message-ID: 721D7305-0B93-4530-8D2C-3405F5F855F4@benjaminarai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That is helpful but these functions to do help me detect errors in
queries such as "(moose & frog" where the left parentheses is
missing. I may just have to write a lexical analyzer.

Benjamin

On Sep 8, 2007, at 10:45 PM, Oleg Bartunov wrote:

> There are two useful functions - numnode() and querytree()
> More details in http://www.sai.msu.su/~megera/postgres/fts/doc/fts-
> query.html
>
> Oleg
> On Sat, 8 Sep 2007, Benjamin Arai wrote:
>
>> Is there a way to pass a query to PostgreSQL to check if the
>> TSeasrch2 search text is valid? For example,
>>
>> SELECT to_tsquery('default', '!');
>>
>> returns an error. I want to know if there is a way get true/
>> false for the '!' portion of the query?
>>
>> Benjamin
>>
>> ---------------------------(end of
>> broadcast)---------------------------
>> TIP 1: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>> message can get through to the mailing list cleanly
>
> Regards,
> Oleg
> _____________________________________________________________
> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
> Sternberg Astronomical Institute, Moscow University, Russia
> Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
> phone: +007(495)939-16-83, +007(495)939-23-83
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2007-09-09 08:33:16 Re: replacing Access/ Approach etc
Previous Message Oleg Bartunov 2007-09-09 05:45:54 Re: Checking is TSearch2 query is valid