diff options
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/keywords.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py index 086aae9..c63f1cc 100644 --- a/sqlparse/keywords.py +++ b/sqlparse/keywords.py @@ -14,6 +14,7 @@ def is_keyword(value): val = value.upper() return (KEYWORDS_COMMON.get(val) or KEYWORDS_ORACLE.get(val) or + KEYWORDS_PLPGSQL.get(val) or KEYWORDS.get(val, tokens.Name)), value @@ -800,3 +801,18 @@ KEYWORDS_ORACLE = { 'UNLIMITED': tokens.Keyword, 'UNLOCK': tokens.Keyword, } + +# PostgreSQL Syntax +KEYWORDS_PLPGSQL = { + 'PARTITION': tokens.Keyword, + 'OVER': tokens.Keyword, + 'PERFORM': tokens.Keyword, + 'NOTICE': tokens.Keyword, + 'PLPGSQL': tokens.Keyword, + 'INHERIT': tokens.Keyword, + 'INDEXES': tokens.Keyword, + + 'FOR': tokens.Keyword, + 'IN': tokens.Keyword, + 'LOOP': tokens.Keyword, +} |
