This commit is contained in:
Komzpa 2012-01-31 16:18:56 +03:00
parent d325118976
commit 70cc5e3036

View file

@ -234,7 +234,10 @@ if options.renderer == "mapnik":
if escape:
escape = escape_sql_column
else:
escape = lambda i, asname=False:'"'+i+'"'
def escape(i, asname=False)
if name in mapped_cols:
return name # already escaped
return '"'+i+'"'
for i in itags:
if i in numerics:
tt.add("""(CASE WHEN %s ~ E'^[[:digit:]]+([.][[:digit:]]+)?$' THEN CAST (%s AS FLOAT) ELSE NULL END) as %s__num"""%(escape(i),escape(i),i))