microsoft / vscode-postgresql

PostgreSQL extension for VSCODE
Other
392 stars 50 forks source link

Syntax highlighter does not support escaped strings ( standard_conforming_strings ) #101

Open smarkwell opened 2 years ago

smarkwell commented 2 years ago

The syntax system does not support C-Style Escaped Strings (Strings prefixed with E) https://www.postgresql.org/docs/9.0/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE

-- Valid PostgreSQL Syntax by default since 7.1
select E'\'Hello\''
-- Invalid PostgreSQL Syntax by default since 7.1
select '\'Hello\''

-- Normal way to escape ' marks in a String constant in PostgreSQL
select '''Hello'''