Re: [Refdb-devel] parentheses in keywords
Status: Beta
Brought to you by:
mhoenicka
From: rob c. <ro...@st...> - 2004-01-30 13:48:00
|
> I had a second look at this issue. The difference between sqlite and > the other database servers is that the former does not use Unix > regexps but the simpler SQL regexps instead. Parentheses do not have a > special meaning in SQL regexps, this is why it worked for me. yup...certainly makes sense... > MySQL and PostgreSQL use Unix regexps in queries like getref > :KW:=whatever. This means that you have to escape any characters with > a special meaning if you want them matched literally. The following > query works for me using MySQL or PostgreSQL as a backend: > > getref ":KW:='52-67-5 \(Penicillamine\)'" > > Now the question is whether RefDB should offer the choice to do a > literal match instead of a regexp match. okay...i think i'm hitting something different now, and may have tracked down what is the real problem; when i execute the above query from the refdbc shell, i get the expected results, but when i do this from bash: refdbc -C getref ":KW:='52-67-5 \(Penicillamine\)'" i get the "subselect failed" error, and the log shows the cut off parentheses again... 7:pid=26684:Thu Jan 29 22:14:35 2004: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 '52-67-5 \\(Penicillamine\\' if you want more logs, i'd be happy to oblige.... thanks again for all your work, rc btw: just added a primitive upload facility to the web front end....must upload RIS data, but again, as a proof-of-concept, it seems to work...feel free to upload stuff: http://junk.lib.muohio.edu/refdb/upload.php |