<Comment>-- PostgreSQL doesn't use # as comment</Comment><br/>
<Keyword>select</Keyword><Normal Text> jsoncol </Normal Text><Operator>#></Operator><Normal Text> </Normal Text><Keyword>array</Keyword><Normal Text>[</Normal Text><Verbatim string>'p1</Verbatim string><String delimiter>'</String delimiter><Normal Text>, </Normal Text><Verbatim string>'p2</Verbatim string><String delimiter>'</String delimiter><Normal Text>]</Normal Text><br/>
<Keyword>from</Keyword><Normal Text> some_table</Normal Text><br/>
<Keyword>where</Keyword><Normal Text> col</Normal Text><Operator>#-</Operator><Verbatim string>'{1, a}</Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Operator>@</Operator><Normal Text>? </Normal Text><Verbatim string>'$.b ? (@ > 0)</Verbatim string><String delimiter>'</String delimiter><Normal Text>;</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Keyword>SELECT</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  </Normal Text><Verbatim string>'Single quoted string</Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test01,</Normal Text><br/>
<Normal Text>  </Normal Text><Verbatim string>'Backslashes in single-quoted strings are interpreted literally and get no highlighting: \ </Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test02,</Normal Text><br/>
<Normal Text>  </Normal Text><Verbatim string>'The single-quote character can be escaped by using two of them: </Verbatim string><Escape sequence>''</Escape sequence><Verbatim string> This is highlighted.</Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test03,</Normal Text><br/>
<Normal Text>  </Normal Text><Verbatim string>'Line breaks</Verbatim string><br/>
<Verbatim string>are allowed</Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test04,</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>Escape strings are introduced with an uppercase E…</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test11,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>e'</String delimiter><String>or a lowercase e.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test12,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>Line breaks</String><br/>
<String>are allowed</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test13,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>The single-quote character can be escaped by using two of them: </String><Escape sequence>''</Escape sequence><String> This is highlighted.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test14,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>They can have escapes like </String><Escape sequence>\t</Escape sequence><String> or three-digit octal </String><Escape sequence>\011</Escape sequence><String> or two-digit hexadecimal </String><Escape sequence>\x09</Escape sequence><String>.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test15,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>Also the escape character itself and the single-quote can be escaped: </String><Escape sequence>\\</Escape sequence><String> and </String><Escape sequence>\'</Escape sequence><String> are highlighted.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test16,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>Non-defined combinations: Example: </String><Escape sequence>\y</Escape sequence><String> is highlighted because it’s treated as escaped characters and substituted by “y”. Even before a line break</String><Escape sequence>\</Escape sequence><br/>
<String>this is possible.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test17,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>Higher Unicode code points: Hex: Four-digit </String><Escape sequence>\u1234</Escape sequence><String> and eight-digit </String><Escape sequence>\U00001234</Escape sequence><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test18,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>E'</String delimiter><String>These escapes with “u” and “U” are the only one that are not error tolerant: </String><Error>\u</Error><String>123 and </String><Error>\u</Error><String>123 are highlighted as errors.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test19,</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>Unicode escape strings are introduced with an uppercase U…</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test21,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>u&'</String delimiter><String>or a lowercase u.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test22,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>The single-quote character can be escaped by using two of them: </String><Escape sequence>''</Escape sequence><String> This is highlighted.</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test23,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>Types of escape: </String><Escape sequence>\0061</Escape sequence><String> and </String><Escape sequence>\+000061</Escape sequence><String> and </String><Escape sequence>\\</Escape sequence><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test24,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>All other usages of </String><Error>\</Error><String> are errors, including </String><Error>\</Error><String delimiter>'</String delimiter><Normal Text> test25,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>Line breaks</String><br/>
<String>are allowed</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test26,</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>User-defined escape characters can be used instead of \ by specifying</String><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>UESCAPE</Keyword><Normal Text> </Normal Text><Verbatim string>'w</Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test31,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>Here, \ behaves as normal character. Escape sequences: </String><Escape sequence>w0061</Escape sequence><String> and </String><Escape sequence>w+000061</Escape sequence><String> and </String><Escape sequence>ww</Escape sequence><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>UESCAPE</Keyword><Normal Text> </Normal Text><Verbatim string>'w</Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test32,</Normal Text><br/>
<Normal Text>  </Normal Text><String delimiter>U&'</String delimiter><String>Also work correctly for escape characters that have a special meaning in Regular Expressions: </String><Escape sequence>.0061</Escape sequence><String> </String><Escape sequence>.+000061</Escape sequence><String> and </String><Escape sequence>..</Escape sequence><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>UESCAPE</Keyword><Normal Text> </Normal Text><Verbatim string>'.</Verbatim string><String delimiter>'</String delimiter><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> test33,</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  </Normal Text><Decimal>0</Decimal><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> </Normal Text><Identifier>U&"Unicode escape identifiers are introduces with an uppercase U…"</Identifier><Normal Text>,</Normal Text><br/>
<Normal Text>  </Normal Text><Decimal>0</Decimal><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> </Normal Text><Identifier>u&"or a lowercase u."</Identifier><Normal Text>,</Normal Text><br/>
<Normal Text>  </Normal Text><Decimal>0</Decimal><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> </Normal Text><Identifier>U&"The double-quote character can be escaped by using two of them: </Identifier><Escape sequence>""</Escape sequence><Identifier> This is highlighted."</Identifier><Normal Text>,</Normal Text><br/>
<Normal Text>  </Normal Text><Decimal>0</Decimal><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> </Normal Text><Identifier>U&"Types of escape: </Identifier><Escape sequence>\0061</Escape sequence><Identifier> and </Identifier><Escape sequence>\+000061</Escape sequence><Identifier> and </Identifier><Escape sequence>\\</Escape sequence><Identifier>"</Identifier><Normal Text>,</Normal Text><br/>
<Normal Text>  </Normal Text><Decimal>0</Decimal><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> </Normal Text><Identifier>U&"All other usages of </Identifier><Error>\</Error><Identifier> are errors, including </Identifier><Error>\</Error><Identifier>"</Identifier><Normal Text>,</Normal Text><br/>
<Normal Text>  </Normal Text><Decimal>0</Decimal><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> </Normal Text><Identifier>U&"Line breaks</Identifier><br/>
<Identifier>are allowed"</Identifier><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  </Normal Text><PostgreSQL function>power</PostgreSQL function><Normal Text>(</Normal Text><Decimal>2</Decimal><Normal Text>, </Normal Text><Decimal>3</Decimal><Normal Text>) </Normal Text><Keyword>AS</Keyword><Normal Text> test31,            </Normal Text><Comment>-- PostgreSQL Build-in functions (like “power”) are highlighted when followed by an opening parenthesis…</Comment><br/>
<Normal Text>  power </Normal Text><Keyword>AS</Keyword><Normal Text> test32, </Normal Text><Decimal>0</Decimal><Normal Text> </Normal Text><Keyword>AS</Keyword><Normal Text> power,      </Normal Text><Comment>-- …but not highlighted if used as identifier.</Comment><br/>
<Normal Text>  </Normal Text><PostGIS function>ST_PointOnSurface</PostGIS function><Normal Text>(way) </Normal Text><Keyword>AS</Keyword><Normal Text> test33, </Normal Text><Comment>-- PostGIS functions are highlighted as extensions.</Comment><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  </Normal Text><Comment>-- User-defined functions get no special highlighting:</Comment><br/>
<Normal Text>  testpower(</Normal Text><Decimal>2</Decimal><Normal Text>, </Normal Text><Decimal>3</Decimal><Normal Text>) </Normal Text><Keyword>AS</Keyword><Normal Text> test34,</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>  foo </Normal Text><Keyword>AS</Keyword><Normal Text> bar</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Keyword>FROM</Keyword><Normal Text> mytable;</Normal Text><br/>
