Commits

Daniele Varrazzo committed 62132bb

More tolerant psql prompt

Recognize stuff as "user@host db=>" too.

  • Participants
  • Parent commits 65bbe3b

Comments (0)

Files changed (1)

pygments/lexers/postgres.py

         ]
     }
 
-re_prompt = re.compile(r'^([a-zA-Z_][a-zA-Z0-9_]+)?[=\-\(][#>]')
+re_prompt = re.compile(r'^.*?[=\-\(][#>]')
+
 re_psql_command = re.compile(r'(\s*)(\\.+?)(\s+)$')
 re_error = re.compile(r'ERROR:')
 re_message = re.compile(r'((?:DEBUG|INFO|NOTICE|WARNING|ERROR|HINT|LINE [0-9]+):)(.*?\n)')