Commits

Daniele Varrazzo committed 2ce0217

Multi-character operators in PostgreSQL

  • Participants
  • Parent commits c1dfa76

Comments (0)

Files changed (2)

File pygments/lexers/postgres.py

             (r'(' + '|'.join([s.replace(" ", "\s+") for s in DATATYPES])
                   + r')\b', Name.Builtin),
             (r'(' + '|'.join(KEYWORDS) + r')\b', Keyword),
-            (r'[+*/<>=~!@#%^&|`?^-]', Operator),
+            (r'[+*/<>=~!@#%^&|`?^-]+', Operator),
             (r'::', Operator),  # cast
             (r'([0-9]*\.[0-9]*|[0-9]+)(e[+-]?[0-9]+)?', Number.Float),
             (r'[0-9]+', Number.Integer),

File tests/examplefiles/psql_session.txt

 (1 row)
 
 piro=> \set foo 30;
-piro=> select * from test where foo < :foo;
+piro=> select * from test where foo <= :foo;
  foo | bar 
 -----+-----
   10 |