diff options
author | Marko Kreen | 2013-02-20 20:21:20 +0000 |
---|---|---|
committer | Marko Kreen | 2013-02-20 20:21:20 +0000 |
commit | 7524030ac84b5d8757d5b6ce8b7b2842edc16a44 (patch) | |
tree | 8f453938fe567a872db9a842a3f9432ba09d0c54 | |
parent | fd7c502dffeee2c137392b312dd2b0e1554a1d6d (diff) |
skytools.quoting: add more keywords
Automatically compare pg-git kwlist.h with our list.
New words:
cross current_catalog current_schema fetch freeze
full ilike inner is isnull join lateral left like
natural notnull outer over overlaps right similar
variadic verbose window with
-rw-r--r-- | python/skytools/quoting.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/python/skytools/quoting.py b/python/skytools/quoting.py index ec8bd8c3..16b85d9d 100644 --- a/python/skytools/quoting.py +++ b/python/skytools/quoting.py @@ -50,22 +50,25 @@ def quote_statement(sql, dict_or_list): qvals = [quote_literal(v) for v in dict_or_list] return sql % tuple(qvals) -# reserved keywords +# reserved keywords (RESERVED_KEYWORD + TYPE_FUNC_NAME_KEYWORD) _ident_kwmap = { "all":1, "analyse":1, "analyze":1, "and":1, "any":1, "array":1, "as":1, -"asc":1, "asymmetric":1, "authorization":1, "both":1, "case":1, "cast":1, "check":1, "collate":1, -"column":1, "constraint":1, "create":1, "current_date":1, "current_role":1, -"current_time":1, "current_timestamp":1, "current_user":1, "default":1, -"deferrable":1, "desc":1, "distinct":1, "do":1, "else":1, "end":1, "except":1, -"false":1, "for":1, "foreign":1, "from":1, "grant":1, "group":1, "having":1, -"in":1, "initially":1, "intersect":1, "into":1, "leading":1, "limit":1, -"localtime":1, "localtimestamp":1, "new":1, "not":1, "null":1, "off":1, -"offset":1, "old":1, "on":1, "only":1, "or":1, "order":1, "placing":1, -"primary":1, "references":1, "returning":1, "select":1, "session_user":1, -"some":1, "symmetric":1, "table":1, "then":1, "to":1, "trailing":1, "true":1, -"union":1, "unique":1, "user":1, "using":1, "when":1, "where":1, -# greenplum? -"errors":1, +"asc":1, "asymmetric":1, "authorization":1, "binary":1, "both":1, "case":1, +"cast":1, "check":1, "collate":1, "collation":1, "column":1, "concurrently":1, +"constraint":1, "create":1, "cross":1, "current_catalog":1, "current_date":1, +"current_role":1, "current_schema":1, "current_time":1, "current_timestamp":1, +"current_user":1, "default":1, "deferrable":1, "desc":1, "distinct":1, +"do":1, "else":1, "end":1, "errors":1, "except":1, "false":1, "fetch":1, +"for":1, "foreign":1, "freeze":1, "from":1, "full":1, "grant":1, "group":1, +"having":1, "ilike":1, "in":1, "initially":1, "inner":1, "intersect":1, +"into":1, "is":1, "isnull":1, "join":1, "lateral":1, "leading":1, "left":1, +"like":1, "limit":1, "localtime":1, "localtimestamp":1, "natural":1, "new":1, +"not":1, "notnull":1, "null":1, "off":1, "offset":1, "old":1, "on":1, "only":1, +"or":1, "order":1, "outer":1, "over":1, "overlaps":1, "placing":1, "primary":1, +"references":1, "returning":1, "right":1, "select":1, "session_user":1, +"similar":1, "some":1, "symmetric":1, "table":1, "then":1, "to":1, "trailing":1, +"true":1, "union":1, "unique":1, "user":1, "using":1, "variadic":1, "verbose":1, +"when":1, "where":1, "window":1, "with":1, } _ident_bad = re.compile(r"[^a-z0-9_]|^[0-9]") |