¡@

Home 

python Programming Glossary: cpy

Use binary COPY table FROM with psycopg2

http://stackoverflow.com/questions/8144002/use-binary-copy-table-from-with-psycopg2

Convert floating point numbers to text write to COPY input cpy StringIO cpy.write ' t'.join repr x for x in num_row ' n' #.. point numbers to text write to COPY input cpy StringIO cpy.write ' t'.join repr x for x in num_row ' n' # Insert data database.. data database converts text back to floating point numbers cpy.seek 0 curs.copy_from cpy 'num_data' columns 'node' 'ts' 'val1'..