Warning, file /frameworks/syntax-highlighting/autotests/html/test.sql_postgres.html was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 <!DOCTYPE html> 0002 <html><head> 0003 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 0004 <title>test.sql_postgres</title> 0005 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (SQL (PostgreSQL)) - Theme (Breeze Light)"/> 0006 </head><body style="background-color:#ffffff;color:#1f1c1b"><pre> 0007 <span style="color:#898887;">-- PostgreSQL doesn't use # as comment</span> 0008 <span style="font-weight:bold;">select</span> jsoncol <span style="color:#ca60ca;">#></span> <span style="font-weight:bold;">array</span>[<span style="color:#e31616;">'p1</span><span style="color:#bf0303;">'</span>, <span style="color:#e31616;">'p2</span><span style="color:#bf0303;">'</span>] 0009 <span style="font-weight:bold;">from</span> some_table 0010 <span style="font-weight:bold;">where</span> col<span style="color:#ca60ca;">#-</span><span style="color:#e31616;">'{1, a}</span><span style="color:#bf0303;">'</span> <span style="color:#ca60ca;">@</span>? <span style="color:#e31616;">'$.b ? (@ > 0)</span><span style="color:#bf0303;">'</span>; 0011 0012 <span style="font-weight:bold;">SELECT</span> 0013 0014 <span style="color:#e31616;">'Single quoted string</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test01, 0015 <span style="color:#e31616;">'Backslashes in single-quoted strings are interpreted literally and get no highlighting: \ </span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test02, 0016 <span style="color:#e31616;">'The single-quote character can be escaped by using two of them: </span><span style="color:#924c9d;">''</span><span style="color:#e31616;"> This is highlighted.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test03, 0017 <span style="color:#e31616;">'Line breaks</span> 0018 <span style="color:#e31616;">are allowed</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test04, 0019 0020 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">Escape strings are introduced with an uppercase E…</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test11, 0021 <span style="color:#bf0303;">e'</span><span style="color:#bf0303;">or a lowercase e.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test12, 0022 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">Line breaks</span> 0023 <span style="color:#bf0303;">are allowed</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test13, 0024 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">The single-quote character can be escaped by using two of them: </span><span style="color:#924c9d;">''</span><span style="color:#bf0303;"> This is highlighted.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test14, 0025 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">They can have escapes like </span><span style="color:#924c9d;">\t</span><span style="color:#bf0303;"> or three-digit octal </span><span style="color:#924c9d;">\011</span><span style="color:#bf0303;"> or two-digit hexadecimal </span><span style="color:#924c9d;">\x09</span><span style="color:#bf0303;">.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test15, 0026 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">Also the escape character itself and the single-quote can be escaped: </span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;"> and </span><span style="color:#924c9d;">\'</span><span style="color:#bf0303;"> are highlighted.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test16, 0027 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">Non-defined combinations: Example: </span><span style="color:#924c9d;">\y</span><span style="color:#bf0303;"> is highlighted because it’s treated as escaped characters and substituted by “y”. Even before a line break</span><span style="color:#924c9d;">\</span> 0028 <span style="color:#bf0303;">this is possible.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test17, 0029 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">Higher Unicode code points: Hex: Four-digit </span><span style="color:#924c9d;">\u1234</span><span style="color:#bf0303;"> and eight-digit </span><span style="color:#924c9d;">\U00001234</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test18, 0030 <span style="color:#bf0303;">E'</span><span style="color:#bf0303;">These escapes with “u” and “U” are the only one that are not error tolerant: </span><span style="color:#bf0303;text-decoration:underline;">\u</span><span style="color:#bf0303;">123 and </span><span style="color:#bf0303;text-decoration:underline;">\u</span><span style="color:#bf0303;">123 are highlighted as errors.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test19, 0031 0032 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">Unicode escape strings are introduced with an uppercase U…</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test21, 0033 <span style="color:#bf0303;">u&'</span><span style="color:#bf0303;">or a lowercase u.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test22, 0034 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">The single-quote character can be escaped by using two of them: </span><span style="color:#924c9d;">''</span><span style="color:#bf0303;"> This is highlighted.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test23, 0035 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">Types of escape: </span><span style="color:#924c9d;">\0061</span><span style="color:#bf0303;"> and </span><span style="color:#924c9d;">\+000061</span><span style="color:#bf0303;"> and </span><span style="color:#924c9d;">\\</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test24, 0036 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">All other usages of </span><span style="color:#bf0303;text-decoration:underline;">\</span><span style="color:#bf0303;"> are errors, including </span><span style="color:#bf0303;text-decoration:underline;">\</span><span style="color:#bf0303;">'</span> test25, 0037 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">Line breaks</span> 0038 <span style="color:#bf0303;">are allowed</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test26, 0039 0040 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">User-defined escape characters can be used instead of \ by specifying</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">UESCAPE</span> <span style="color:#e31616;">'w</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test31, 0041 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">Here, \ behaves as normal character. Escape sequences: </span><span style="color:#924c9d;">w0061</span><span style="color:#bf0303;"> and </span><span style="color:#924c9d;">w+000061</span><span style="color:#bf0303;"> and </span><span style="color:#924c9d;">ww</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">UESCAPE</span> <span style="color:#e31616;">'w</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test32, 0042 <span style="color:#bf0303;">U&'</span><span style="color:#bf0303;">Also work correctly for escape characters that have a special meaning in Regular Expressions: </span><span style="color:#924c9d;">.0061</span><span style="color:#bf0303;"> </span><span style="color:#924c9d;">.+000061</span><span style="color:#bf0303;"> and </span><span style="color:#924c9d;">..</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">UESCAPE</span> <span style="color:#e31616;">'.</span><span style="color:#bf0303;">'</span> <span style="font-weight:bold;">AS</span> test33, 0043 0044 <span style="color:#b08000;">0</span> <span style="font-weight:bold;">AS</span> <span style="color:#006e28;">U&"Unicode escape identifiers are introduces with an uppercase U…"</span>, 0045 <span style="color:#b08000;">0</span> <span style="font-weight:bold;">AS</span> <span style="color:#006e28;">u&"or a lowercase u."</span>, 0046 <span style="color:#b08000;">0</span> <span style="font-weight:bold;">AS</span> <span style="color:#006e28;">U&"The double-quote character can be escaped by using two of them: </span><span style="color:#924c9d;">""</span><span style="color:#006e28;"> This is highlighted."</span>, 0047 <span style="color:#b08000;">0</span> <span style="font-weight:bold;">AS</span> <span style="color:#006e28;">U&"Types of escape: </span><span style="color:#924c9d;">\0061</span><span style="color:#006e28;"> and </span><span style="color:#924c9d;">\+000061</span><span style="color:#006e28;"> and </span><span style="color:#924c9d;">\\</span><span style="color:#006e28;">"</span>, 0048 <span style="color:#b08000;">0</span> <span style="font-weight:bold;">AS</span> <span style="color:#006e28;">U&"All other usages of </span><span style="color:#bf0303;text-decoration:underline;">\</span><span style="color:#006e28;"> are errors, including </span><span style="color:#bf0303;text-decoration:underline;">\</span><span style="color:#006e28;">"</span>, 0049 <span style="color:#b08000;">0</span> <span style="font-weight:bold;">AS</span> <span style="color:#006e28;">U&"Line breaks</span> 0050 <span style="color:#006e28;">are allowed"</span> 0051 0052 <span style="color:#644a9b;">power</span>(<span style="color:#b08000;">2</span>, <span style="color:#b08000;">3</span>) <span style="font-weight:bold;">AS</span> test31, <span style="color:#898887;">-- PostgreSQL Build-in functions (like “power”) are highlighted when followed by an opening parenthesis…</span> 0053 power <span style="font-weight:bold;">AS</span> test32, <span style="color:#b08000;">0</span> <span style="font-weight:bold;">AS</span> power, <span style="color:#898887;">-- …but not highlighted if used as identifier.</span> 0054 <span style="color:#0095ff;font-weight:bold;">ST_PointOnSurface</span>(way) <span style="font-weight:bold;">AS</span> test33, <span style="color:#898887;">-- PostGIS functions are highlighted as extensions.</span> 0055 0056 <span style="color:#898887;">-- User-defined functions get no special highlighting:</span> 0057 testpower(<span style="color:#b08000;">2</span>, <span style="color:#b08000;">3</span>) <span style="font-weight:bold;">AS</span> test34, 0058 0059 foo <span style="font-weight:bold;">AS</span> bar 0060 0061 <span style="font-weight:bold;">FROM</span> mytable; 0062 </pre></body></html>