Re: repeated characters in SQL - Mailing list pgsql-general

From Tom Lane
Subject Re: repeated characters in SQL
Date
Msg-id 15228.1453660870@sss.pgh.pa.us
Whole thread Raw
In response to Re: repeated characters in SQL  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
Francisco Olarte <folarte@peoplecall.com> writes:
> On Sun, Jan 24, 2016 at 7:05 PM,  <rashapoo@gmail.com> wrote:
>> I guess the escape character (which is not needed in, say, Notepad++) threw
>> me a bit.

> Notepad ++ is, AFAIK,  an editor, it SHOULD (within reason) let you
> write any text.

> The double quote is needed due to the quoting rules of the language.
> You want the regexp engine to see the characters leftp, dot, rightp,
> backslash, one. But backslah is the scape character in strings ( in
> many languages ), so you need to escape it too.

In this particular case, the extra backslash was needed only because
the OP used E'...' syntax for his string literal.  In a plain SQL
string literal, backslash isn't special.

            regards, tom lane


pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: repeated characters in SQL
Next
From: "Regina Obe"
Date:
Subject: Re: CoC [Final v2]