summaryrefslogtreecommitdiff
path: root/python/skytools/quoting.py
diff options
context:
space:
mode:
authorMarko Kreen2008-03-11 20:47:24 +0000
committerMarko Kreen2008-03-11 20:47:24 +0000
commitc73f2559e3a26c31ff1d82b2f55b892e22fcf532 (patch)
treeceba935cceccd8f02d4b334b85c3c923412f7d87 /python/skytools/quoting.py
parent906c5e614fe4c669f73b712487201c5b0a53beec (diff)
Fix bugs in previous commit.
Diffstat (limited to 'python/skytools/quoting.py')
-rw-r--r--python/skytools/quoting.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/skytools/quoting.py b/python/skytools/quoting.py
index 10492b37..6f686bf8 100644
--- a/python/skytools/quoting.py
+++ b/python/skytools/quoting.py
@@ -5,12 +5,14 @@
import re
__all__ = [
+ # _pyqoting / _cquoting
"quote_literal", "quote_copy", "quote_bytea_raw",
"db_urlencode", "db_urldecode", "unescape",
-
+ "unquote_literal",
+ # local
"quote_bytea_literal", "quote_bytea_copy", "quote_statement",
"quote_ident", "quote_fqident", "quote_json", "unescape_copy",
- "unquote_ident", "unquote_literal",
+ "unquote_ident",
]
try:
@@ -106,7 +108,7 @@ def unescape_copy(val):
return None
return unescape(val)
-def unquote_sql_ident(val):
+def unquote_ident(val):
"""Unquotes possibly quoted SQL identifier."""
if val[0] == '"' and val[-1] == '"':
return val[1:-1].replace('""', '"')