summaryrefslogtreecommitdiff
path: root/pygments/lexers/postgres.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/postgres.py')
-rw-r--r--pygments/lexers/postgres.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py
index e99630fd..8aeab3b8 100644
--- a/pygments/lexers/postgres.py
+++ b/pygments/lexers/postgres.py
@@ -99,7 +99,7 @@ class PostgresLexer(RegexLexer):
(r'(?ms)(\$[^\$]*\$)(.*?)(\1)', language_callback),
(r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
- # TODO: consider splitting the regex parser
+ # TODO: consider splitting the psql parser
(r'\\[^\s]+', Keyword.Pseudo, 'psql-command'),
# psql variable in SQL
(r""":(['"]?)[a-z][a-z0-9_]*\b\1""", Name.Variable),
@@ -115,6 +115,7 @@ class PostgresLexer(RegexLexer):
'psql-command': [
(r'\n', Text, 'root'),
(r'\s+', Text),
+ (r'\\[^\s]+', Keyword.Pseudo),
(r""":(['"]?)[a-z][a-z0-9_]*\b\1""", Name.Variable),
(r"'(''|[^'])*'", String.Single),
(r"`([^`])*`", String.Backtick),