Project

General

Profile

« Previous | Next » 

Revision 4407

sql_io.py: cleanup_table(): Only clean up text columns, to support staging tables with other column types

View differences:

sql_io.py
23 23
def cleanup_table(db, table, cols):
24 24
    table = sql_gen.as_Table(table)
25 25
    cols = [sql_gen.as_Col(c, table) for c in cols]
26
    cols = filter(lambda c: sql_gen.is_text_col(db, c), cols)
26 27
    
27 28
    expr = 'trim(both from %s)'
28 29
    for null in null_strs: expr = 'nullif('+expr+', '+db.esc_value(null)+')'

Also available in: Unified diff