diff options
author | Marko Kreen | 2010-11-25 12:10:13 +0000 |
---|---|---|
committer | Marko Kreen | 2010-11-25 12:10:13 +0000 |
commit | 7c985ab39451e9133fc5c06cef6e123cfc3ab5b9 (patch) | |
tree | 69dcadef4fcd107c87aaed25ddd241565dc12d41 | |
parent | 655116d41a863c902c1f7957e4c29ba990dd2583 (diff) |
unquote_ident: lowercase the non-quoted value
Otherwise the value will later be quoted incorrectly.
-rw-r--r-- | python/skytools/quoting.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/skytools/quoting.py b/python/skytools/quoting.py index b143ee2b..d04394cb 100644 --- a/python/skytools/quoting.py +++ b/python/skytools/quoting.py @@ -135,7 +135,7 @@ def unescape_copy(val): def unquote_ident(val): """Unquotes possibly quoted SQL identifier. - >>> unquote_ident('foo') + >>> unquote_ident('Foo') 'foo' >>> unquote_ident('"Wei "" rd"') 'Wei " rd' @@ -144,7 +144,7 @@ def unquote_ident(val): return val[1:-1].replace('""', '"') if val.find('"') > 0: raise Exception('unsupported syntax') - return val + return val.lower() def unquote_fqident(val): """Unquotes fully-qualified possibly quoted SQL identifier. |