Revision 2591
Added by Aaron Marcuse-Kubitza almost 13 years ago
sql_gen.py | ||
---|---|---|
23 | 23 |
return re.match(r'^(?=.*_)(?!\d)[^\WA-Z]+$', name) |
24 | 24 |
|
25 | 25 |
def esc_name(name, quote='"'): |
26 |
if is_safe_name(name): return name |
|
27 | 26 |
return quote + name.replace(quote, quote+quote) + quote |
28 | 27 |
# doubling an embedded quote escapes it in both PostgreSQL and MySQL |
29 | 28 |
|
Also available in: Unified diff
sql_gen.py: esc_name(): Don't return plain name if is_safe_name(), because this makes the SQL inconsistent when some names have "_"s and some don't