summaryrefslogtreecommitdiff
path: root/pygments/lexers/postgres.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-04-12 10:27:04 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2011-04-12 10:27:04 +0100
commit11e7b64a90c769d9d6939b505afab780a2cef5c4 (patch)
tree88e6daef88304fa493f50496a58975b42e967ccd /pygments/lexers/postgres.py
parent65f922591a2c55d7955bcd3fb607fd529b391d5e (diff)
downloadpygments-11e7b64a90c769d9d6939b505afab780a2cef5c4.tar.gz
Added list of pseudo-datatypes to PostgreSQL lexer
Diffstat (limited to 'pygments/lexers/postgres.py')
-rw-r--r--pygments/lexers/postgres.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/lexers/postgres.py b/pygments/lexers/postgres.py
index 583e118d..b4dc9df0 100644
--- a/pygments/lexers/postgres.py
+++ b/pygments/lexers/postgres.py
@@ -18,7 +18,8 @@ from pygments.token import Error, Punctuation, Literal, Token, \
Text, Comment, Operator, Keyword, Name, String, Number, Generic
from pygments.lexers import get_lexer_by_name, ClassNotFound
-from pygments.lexers._postgres_builtins import KEYWORDS, DATATYPES
+from pygments.lexers._postgres_builtins import (
+ KEYWORDS, DATATYPES, PSEUDO_TYPES)
__all__ = [ 'PostgresLexer', 'PostgresConsoleLexer' ]
@@ -86,7 +87,8 @@ class PostgresLexer(RegexLexer):
(r'\s+', Text),
(r'--.*?\n', Comment.Single),
(r'/\*', Comment.Multiline, 'multiline-comments'),
- (r'(' + '|'.join([s.replace(" ", "\s+") for s in DATATYPES])
+ (r'(' + '|'.join([s.replace(" ", "\s+")
+ for s in DATATYPES + PSEUDO_TYPES])
+ r')\b', Name.Builtin),
(r'(' + '|'.join(KEYWORDS) + r')\b', Keyword),
(r'[+*/<>=~!@#%^&|`?^-]+', Operator),