[Refdb-devel] parentheses in keywords
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mar...@mh...> - 2004-01-27 22:52:13
|
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 mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |