From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Francisco Olarte <folarte(at)peoplecall(dot)com> |
Cc: | rashapoo(at)gmail(dot)com, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: repeated characters in SQL |
Date: | 2016-01-24 18:41:10 |
Message-ID: | 15228.1453660870@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Francisco Olarte <folarte(at)peoplecall(dot)com> writes:
> On Sun, Jan 24, 2016 at 7:05 PM, <rashapoo(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Regina Obe | 2016-01-24 19:07:12 | Re: CoC [Final v2] |
Previous Message | Francisco Olarte | 2016-01-24 18:31:12 | Re: repeated characters in SQL |