Re: the use of $$string$$

From: bricklen <bricklen(at)gmail(dot)com>
To: John Fabiani <johnf(at)jfcomputer(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: the use of $$string$$
Date: 2011-11-04 14:57:23
Message-ID: CAGrpgQ_yzxAFaboYEzAum7piWYyhppo2PoBX8awv4j6HxevrmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Nov 4, 2011 at 7:38 AM, John Fabiani <johnf(at)jfcomputer(dot)com> 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.

E'...' is the escape string syntax. You can find examples of it in
this page (among others)
http://www.postgresql.org/docs/9.0/interactive/functions-matching.html
You might want to read up on standard_conforming_strings and
escape_string_warning too, as they influence how the escaping works.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2011-11-04 14:57:24 Re: the use of $$string$$
Previous Message John Fabiani 2011-11-04 14:38:29 the use of $$string$$