Skip site navigation (1) Skip section navigation (2)

Poorly designed tsearch NOTICEs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Poorly designed tsearch NOTICEs
Date: 2007-10-20 19:24:57
Message-ID: 11978.1192908297@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
regression=# SELECT plainto_tsquery('the any'); 
NOTICE:  query contains only stopword(s) or doesn't contain lexeme(s), ignored
 plainto_tsquery 
-----------------
 
(1 row)

regression=# select ''::tsquery;
NOTICE:  tsearch query doesn't contain lexeme(s): ""
 tsquery 
---------
 
(1 row)

IMHO, it's really bad design to have this sort of NOTICE emitted by
tsquery input.  Even if an application uses numnode() or querytree() or
something similar to detect bogus queries, it's going to have its logs
cluttered with these notices.

I could see having the @@ operator emit the notice if the query is
actually used for searching --- though I'm not quite sure how to get it
to come out only once per query ... maybe we could put it into the index
consistent() functions somehow?

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: Rainer BauerDate: 2007-10-20 20:15:27
Subject: Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous:From: Sibte AbbasDate: 2007-10-20 18:55:22
Subject: Re: NULL and plpgsql rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group