diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-04 12:37:08 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-04-04 12:37:08 +0100 |
commit | 36aae230c886fb0b2e5b8c79aec03cee0c40256a (patch) | |
tree | 41e94aa8c8ee6c9ca38b58c4cd975c8e6eed0659 | |
parent | 1c9efd94c23b580050494fc8d18f11d18ed23a5d (diff) | |
download | pygments-36aae230c886fb0b2e5b8c79aec03cee0c40256a.tar.gz |
Multi-character operators in PostgreSQL
-rw-r--r-- | pygments/lexers/postgres.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/psql_session.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py index a460d1fe..8b584811 100644 --- a/pygments/lexers/postgres.py +++ b/pygments/lexers/postgres.py @@ -42,7 +42,7 @@ class PostgresLexer(RegexLexer): (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), diff --git a/tests/examplefiles/psql_session.txt b/tests/examplefiles/psql_session.txt index fc39b42c..a0f045bc 100644 --- a/tests/examplefiles/psql_session.txt +++ b/tests/examplefiles/psql_session.txt @@ -15,7 +15,7 @@ HINT: Use the escape string syntax for escapes, e.g., E'\r\n'. (1 row) piro=> \set foo 30; -piro=> select * from test where foo < :foo; +piro=> select * from test where foo <= :foo; foo | bar -----+----- 10 | |