Re: SQL syntax highlightning don't work for single backslash '\'

From: Melvin Davidson <melvin6925(at)yahoo(dot)com>
To: "mammoth(dot)power(at)gmx(dot)us" <mammoth(dot)power(at)gmx(dot)us>, "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: SQL syntax highlightning don't work for single backslash '\'
Date: 2017-05-22 19:38:43
Message-ID: 300404499.4486302.1495481924018@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

>When I have somewhere in text value single backslash char, then everything behind this char will not be highlighted correct.
That is because the Backslash is an ESCAPE character, so you must ESCAPE it and use two backslashes if you want it to be interpretedas a literal.
Also, do not forget to enclose your strings in quotes!
IE:
SELECT 'a' || E'\\' || 'b'
UNION ALL
SELECT 'c' || E'\\' || 'd';

https://www.postgresql.org/docs/9.4/static/functions-matching.html#POSIX-ESCAPE-SEQUENCES Melvin Davidson 🎸
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
www.youtube.com/unusedhero/videos
Folk Alley - All Folk - 24 Hours a day
www.folkalley.com

From: "mammoth(dot)power(at)gmx(dot)us" <mammoth(dot)power(at)gmx(dot)us>
To: pgadmin-support(at)postgresql(dot)org
Sent: Monday, May 22, 2017 3:17 PM
Subject: [pgadmin-support] SQL syntax highlightning don't work for single backslash '\'

<!--#yiv1549832465 _filtered #yiv1549832465 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv1549832465 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv1549832465 {font-family:"Segoe UI";panose-1:2 11 5 2 4 2 4 2 2 3;} _filtered #yiv1549832465 {font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}#yiv1549832465 #yiv1549832465 p.yiv1549832465MsoNormal, #yiv1549832465 li.yiv1549832465MsoNormal, #yiv1549832465 div.yiv1549832465MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}#yiv1549832465 a:link, #yiv1549832465 span.yiv1549832465MsoHyperlink {color:blue;text-decoration:underline;}#yiv1549832465 a:visited, #yiv1549832465 span.yiv1549832465MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv1549832465 p.yiv1549832465MsoPlainText, #yiv1549832465 li.yiv1549832465MsoPlainText, #yiv1549832465 div.yiv1549832465MsoPlainText {margin:0cm;margin-bottom:.0001pt;font-size:10.0pt;font-family:"Segoe UI", "sans-serif";}#yiv1549832465 p.yiv1549832465MsoAcetate, #yiv1549832465 li.yiv1549832465MsoAcetate, #yiv1549832465 div.yiv1549832465MsoAcetate {margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;font-family:"Tahoma", "sans-serif";}#yiv1549832465 span.yiv1549832465E-MailFormatvorlage17 {font-family:"Segoe UI", "sans-serif";color:windowtext;}#yiv1549832465 span.yiv1549832465SprechblasentextZchn {font-family:"Tahoma", "sans-serif";}#yiv1549832465 span.yiv1549832465NurTextZchn {font-family:"Segoe UI", "sans-serif";}#yiv1549832465 .yiv1549832465MsoChpDefault {font-family:"Calibri", "sans-serif";} _filtered #yiv1549832465 {margin:70.85pt 70.85pt 2.0cm 70.85pt;}#yiv1549832465 div.yiv1549832465WordSection1 {}-->When I have somewhere in text value single backslash char, then everything behind this char will not be highlighted correct.  Simple example 1:  SELECT '\';  Simple example 2:  -- Test 1SELECT       a || '\' || bUNION ALL-- Test 2SELECT       c || '\' || d;  Screenshots of syntax highlighting:  Single backslash:    Dual backslash:    pgAdmin 4 v1.5Desktop RuntimeWindows 10 x64 1511

Attachment Content-Type Size
image/png 3.4 KB
image/png 3.7 KB

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message mammoth.power 2017-05-22 19:52:05 Re: SQL syntax highlightning don't work for single backslash '\'
Previous Message mammoth.power 2017-05-22 19:36:52 Query Editor: Size of last column can't be increased