parentheses in keywords

"Markus Hoenicka" <[email protected]>
Newsgroups gmane.text.refdb.devel
Message-ID <[email protected]>
rob caSSon writes:
 > i'm playing with a web front end to refdb-0.9.4-pre5, and may have
 > stumbled on a small bug...
 > 
 > using the test data, searching on something like "10102-43-9 (Nitric
 > Oxide)" fails with "subselect failed"
 > 
 > i first tried escaping them with slashes for the RLIKE, as this works
 > for [], but to no avail..
 > 
 > from the looks of the log, the final parentheses is getting cut off:
 > 
 > getref -t risx :KW:="10102-43-9 (Nitric Oxide)"
 > 
 > from the log:
 > 
 > SELECT DISTINCT t_xkeyword.xref_id FROM t_xkeyword, t_keyword
 >     WHERE t_xkeyword.xkeyword_type='REFERENCE'
 >         AND t_keyword.keyword_id=t_xkeyword.keyword_id
 >         AND t_keyword.keyword_name RLIKE '10102-43-9 (Nitric Oxide'
 > 
 > aside from the missing parentheses, it just needs the necessary escaping
 > for the RLIKE:
 > 
 > SELECT DISTINCT t_xkeyword.xref_id FROM t_xkeyword, t_keyword
 >     WHERE t_xkeyword.xkeyword_type='REFERENCE'
 >         AND t_keyword.keyword_id=t_xkeyword.keyword_id
 >         AND t_keyword.keyword_name RLIKE '10102-43-9 \\(Nitric Oxide\\)'
 > 
 > hope this isn't a dupe, or just plain stupidity on my part ;)
 > 

I'd rather suspect it's my fault. I can reproduce it over here, but I
think that the problem is unrelated to SQL parser problems. I guess it
is my query parser that screws up things. As a temporary workaround,
something like (using SQLite):

  getref -t risx :KW:="10102-43-9 (Nitric Oxide%"

should do the trick. I'll try to get back with a fix asap.

regards,
Markus

-- 
Markus Hoenicka
[email protected]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.