summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/postgres.py2
-rw-r--r--tests/examplefiles/psql_session.txt1
2 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py
index 4c5bd007..902edd5b 100644
--- a/pygments/lexers/postgres.py
+++ b/pygments/lexers/postgres.py
@@ -231,7 +231,7 @@ re_psql_command = re.compile(r'(\s*)(\\.+?)(\s+)$')
re_error = re.compile(r'(ERROR|FATAL):')
re_message = re.compile(
r'((?:DEBUG|INFO|NOTICE|WARNING|ERROR|'
- r'FATAL|HINT|DETAIL|LINE [0-9]+):)(.*?\n)')
+ r'FATAL|HINT|DETAIL|CONTEXT|LINE [0-9]+):)(.*?\n)')
def lookahead(x):
"""Wrap an iterator and allow pushing back an item."""
diff --git a/tests/examplefiles/psql_session.txt b/tests/examplefiles/psql_session.txt
index fd87a133..7096072b 100644
--- a/tests/examplefiles/psql_session.txt
+++ b/tests/examplefiles/psql_session.txt
@@ -1,5 +1,6 @@
regression=# select foo;
ERROR: column "foo" does not exist
+CONTEXT: PL/pgSQL function "test1" while casting return value to function's return type
LINE 1: select foo;
^
regression=# \q