problem with single quote : ' - Mailing list pgsql-novice

From Srinivas Iyyer
Subject problem with single quote : '
Date
Msg-id 20060822174410.33124.qmail@web38110.mail.mud.yahoo.com
Whole thread Raw
Responses Re: problem with single quote : '  (Brian Hurt <bhurt@janestcapital.com>)
List pgsql-novice
Dear group,
 In one of my tables, the varchar data includes
single-quotes.

Example:
3',5'-cyclic-nucleotide phosphodiesterase

I populated tables by introducing \ in front of '

Example:
3\',5\'-cyclic-nucleotide phosphodiesterase


I am using R to query and analyze the data and it is
turning out to be a problem to get a character vector
in R to have the output like this:

EXECUTE count_fterm_sql('3\',5\'-cyclic-nucleotide
phosphodiesterase activity');

somehow it always provides me
EXECUTE count_fterm_sql('3\\',5\\'-cyclic-nucleotide
phosphodiesterase activity');

The above query with two \\ does not work in postgres.


I tried a variety of tricks in R to get to what I want
that suits postgres. No luck.

so I decided to substitute where ever I find instances
of '  (i.e: 3', 10', esterase's etc) to "prime".

Eg: 3prime, 10prime, esterasesprimes.

I have all my data in table gobe. I dont know how many
rows have ' character.

how can I substitute ' with prime in the whole table.

BTW, is this a good way to solve the problem.  For
instance bioinformatics people who are dealing with GO
terms, how are they approaching this problem.

PS: Dear Sean, what is your opinion.  did you ever
come across this problem.  Do you have any solution in
R.

thanks


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-novice by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: response time data
Next
From: "Jasbinder Bali"
Date:
Subject: Passing Arguments to a trigger function(Problem)