pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
the return value of select statement includes unwanted quote
2+ messages / 2 participants
[nested] [flat]

* the return value of select statement includes unwanted quote
@ 2007-04-09 17:55 L Chou <leahalbany@gmail.com>
  2007-04-09 19:22 ` Re: the return value of select statement includes unwanted quote Sean Davis <sdavis2@mail.nih.gov>
  0 siblings, 1 reply; 2+ messages in thread

From: L Chou @ 2007-04-09 17:55 UTC (permalink / raw)
  To: pgsql-interfaces

Hi, I am writing perl code and using DBI to connect to the postgreSQL
database.  I found that if the column type is varchar, then the return value
of this column will always be double quoted.   Is there a way that I could
remove the double quote from the return value?  since if I use a compound
statement and used the return value to query the database, then PostgreSQL
doen't recognize the double quote.  If I put extra single quote around the
return value, then the value has extra two double quote around it, and it
doesn't match any record in the database.

Please advise if there is any way to remove the double quote.

Thanks,

Leah

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: the return value of select statement includes unwanted quote
  2007-04-09 17:55 the return value of select statement includes unwanted quote L Chou <leahalbany@gmail.com>
@ 2007-04-09 19:22 ` Sean Davis <sdavis2@mail.nih.gov>
  0 siblings, 0 replies; 2+ messages in thread

From: Sean Davis @ 2007-04-09 19:22 UTC (permalink / raw)
  To: pgsql-interfaces; +Cc: L Chou <leahalbany@gmail.com>

On Monday 09 April 2007 13:55, L Chou wrote:
> Hi, I am writing perl code and using DBI to connect to the postgreSQL
> database.  I found that if the column type is varchar, then the return
> value of this column will always be double quoted.   Is there a way that I
> could remove the double quote from the return value?  since if I use a
> compound statement and used the return value to query the database, then
> PostgreSQL doen't recognize the double quote.  If I put extra single quote
> around the return value, then the value has extra two double quote around
> it, and it doesn't match any record in the database.
>
> Please advise if there is any way to remove the double quote.

DBI isn't doing this, I don't think.  Did the data contain quotes when you 
loaded them?  Are the quotes present in pgAdmin III or psql?  

Sean



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-04-09 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-09 17:55 the return value of select statement includes unwanted quote L Chou <leahalbany@gmail.com>
2007-04-09 19:22 ` Sean Davis <sdavis2@mail.nih.gov>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox