Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C1C28B5DF7A for ; Fri, 4 Nov 2011 12:27:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 43849-01-10 for ; Fri, 4 Nov 2011 15:27:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from newserver.jfcomputer.com (unknown [76.14.161.106]) by mail.postgresql.org (Postfix) with ESMTP id 0836DB5DFD1 for ; Fri, 4 Nov 2011 12:26:19 -0300 (ADT) Received: from localhost (unknown [127.0.0.1]) by newserver.jfcomputer.com (Postfix) with ESMTP id 0AD935E09 for ; Fri, 4 Nov 2011 15:26:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at site Received: from newserver.jfcomputer.com ([127.0.0.1]) by localhost (linux-jfp8.site [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K129Wir2GK0w for ; Fri, 4 Nov 2011 08:26:16 -0700 (PDT) Received: from linux-desktop.localnet (unknown [192.168.1.143]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johnf@jfcomputer.com) by newserver.jfcomputer.com (Postfix) with ESMTPSA id 8FC572C9C for ; Fri, 4 Nov 2011 08:26:16 -0700 (PDT) From: John Fabiani Organization: J.F. Computer Solutions To: pgsql-sql@postgresql.org Subject: Re: the use of $$string$$ Date: Fri, 4 Nov 2011 08:26:16 -0700 User-Agent: KMail/1.13.5 (Linux/2.6.34.10-0.2-desktop; KDE/4.4.4; i686; ; ) References: <201111040738.29303.johnf@jfcomputer.com> In-Reply-To: <201111040738.29303.johnf@jfcomputer.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111040826.16177.johnf@jfcomputer.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.106 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RDNS_NONE=0.793, TO_NO_BRKTS_NORDNS=0.001 X-Spam-Level: X-Archive-Number: 201111/16 X-Sequence-Number: 35989 On Friday, November 04, 2011 07:38:29 am John Fabiani wrote: > Hi, > I just discovered that I can use $$string$$ to account for the problem of > single quotes in the string (or other strange char's). However, I noticed > that the table field contained E'string'. I actually tried to find info on > this but I did not find anything. > > Could someone explain what it means or better provide a web link for me to > discover the info. > > Thanks in advance, > Johnf Thank you both for the quick replies and the links. What I still do not understand (I'm a little slow) is the fact that pgadmin3 showed the data as E'string'. So I'm wondering if the data is now different in the sense that I need use the 'E' in the field. For example I have the last name of O'Reilly the field lname now appears to contain E'O'Reilly' So will the normal select statements work; Select * from table where lname = 'O'' Reilly' Select * from table where lname like 'O%' or will I need to know the data contains the "E" and add the 'E' to the sql statements? Thanks Johnf