Re: [pgadmin-support] SQL syntax highlightning don't work for single backslash '\' - Mailing list pgadmin-support

From Melvin Davidson
Subject Re: [pgadmin-support] SQL syntax highlightning don't work for single backslash '\'
Date
Msg-id 300404499.4486302.1495481924018@mail.yahoo.com
Whole thread Raw
In response to [pgadmin-support] SQL syntax highlightning don't work for single backslash '\'  (<mammoth.power@gmx.us>)
Responses Re: [pgadmin-support] SQL syntax highlightning don't work for single backslash '\'
Re: [pgadmin-support] SQL syntax highlightning don't work for singlebackslash '\'
List 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 interpreted
as a literal.

Also, do not forget to enclose your strings in quotes!
IE:
SELECT 'a' || E'\\' || 'b'
UNION ALL
SELECT 'c' || E'\\' || 'd';

 
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.power@gmx.us" <mammoth.power@gmx.us>
To: pgadmin-support@postgresql.org
Sent: Monday, May 22, 2017 3:17 PM
Subject: [pgadmin-support] SQL syntax highlightning don't work for single backslash '\'

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 1
SELECT       a || '\' || b
UNION ALL
-- Test 2
SELECT       c || '\' || d;
 
Screenshots of syntax highlighting:
 
Single backslash:
 
 
Dual backslash:
 
 
pgAdmin 4 v1.5
Desktop Runtime
Windows 10 x64 1511


Attachment

pgadmin-support by date:

Previous
From:
Date:
Subject: [pgadmin-support] Query Editor: Size of last column can't be increased
Next
From:
Date:
Subject: Re: [pgadmin-support] SQL syntax highlightning don't work for single backslash '\'