Commit ea5deede authored by ARCHER's avatar ARCHER

revert to original method_copy with no quotes

parent 31fb036c
......@@ -83,12 +83,13 @@ def method_copy(table, conn, keys, data_iter):
columns = ', '.join('"{}"'.format(k) for k in keys)
if table.schema:
table_name = '"{}"."{}"'.format(table.schema, table.name)
table_name = '{}.{}'.format(table.schema, table.name)
else:
table_name = '"%s"' % table.name
table_name = '%s' % table.name
sql = 'COPY "{}" ({}) FROM STDIN WITH CSV'.format(
sql = 'COPY {} ({}) FROM STDIN WITH CSV'.format(
table_name, columns)
logger.debug('method_copy sql code: %s' % sql)
cur.copy_expert(sql=sql, file=s_buf)
to_sql_methods = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment