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

problem with single quote : '

From: Srinivas Iyyer <srini_iyyer_bio(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: problem with single quote : '
Date: 2006-08-22 17:44:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Dear group, 
 In one of my tables, the varchar data includes

3',5'-cyclic-nucleotide phosphodiesterase

I populated tables by introducing \ in front of ' 

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


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 


pgsql-novice by date

Next:From: Jasbinder BaliDate: 2006-08-22 17:48:06
Subject: Passing Arguments to a trigger function(Problem)
Previous:From: A. KretschmerDate: 2006-08-22 16:21:51
Subject: Re: response time data

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