Revision 4994
Added by Aaron Marcuse-Kubitza over 12 years ago
bin/csv2db | ||
---|---|---|
74 | 74 |
sql.create_table(db, table, typed_cols, has_pkey=False, |
75 | 75 |
col_indexes=False) |
76 | 76 |
|
77 |
# Remove rows from any failed COPY FROM |
|
78 |
sql.truncate(db, table) |
|
79 |
|
|
80 | 77 |
def load_(): |
81 | 78 |
# Create COPY FROM statement |
82 | 79 |
if use_copy_from[0]: |
Also available in: Unified diff
csv2db: Don't truncate the table before loading rows because it has just been created, and is therefore empty. This statement may be left over from a time when the table was created only once, and its creation was not rolled back if the import fails.