Re: the use of $$string$$ - Mailing list pgsql-sql

From John Fabiani
Subject Re: the use of $$string$$
Date
Msg-id 201111040826.16177.johnf@jfcomputer.com
Whole thread Raw
In response to the use of $$string$$  (John Fabiani <johnf@jfcomputer.com>)
Responses Re: the use of $$string$$  (David Johnston <polobo@yahoo.com>)
Re: the use of $$string$$  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: the use of $$string$$
Next
From: David Johnston
Date:
Subject: Re: the use of $$string$$