Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 04F059FB692 for ; Mon, 9 Apr 2007 16:29:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 69393-01-8 for ; Mon, 9 Apr 2007 16:29:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from nihrelayxway2.hub.nih.gov (mailfwd.nih.gov [128.231.90.107]) by postgresql.org (Postfix) with ESMTP id 840849FB83B for ; Mon, 9 Apr 2007 16:23:10 -0300 (ADT) Received: from pressa.nci.nih.gov ([137.187.209.230]) by nihrelayxway2.hub.nih.gov with ESMTP; 09 Apr 2007 15:22:06 -0400 X-IronPortListener: NIH_Relay X-SBRS: None X-IronPort-AV: i="4.14,388,1170651600"; d="scan'208"; a="287830305:sNHT14624044" From: Sean Davis Organization: NIH To: pgsql-interfaces@postgresql.org Subject: Re: the return value of select statement includes unwanted quote Date: Mon, 9 Apr 2007 15:22:05 -0400 User-Agent: KMail/1.9.5 Cc: "L Chou" References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704091522.05914.sdavis2@mail.nih.gov> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/7 X-Sequence-Number: 6495 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