New answers tagged

0

Gnumeric is a third party package, it can be downloaded from their site. Yum install gnumeric won't work on RedHat servers.


4

You can specify the individual columns to fill in the COPY command: COPY table_name [ ( column [, ...] ) ] FROM { 'filename' | STDIN } [ [ WITH ] ( option [, ...] ) ] (http://www.postgresql.org/docs/9.1/static/sql-copy.html) Therefore, specify your CSV columns explicitly in the COPY, leaving out the bigserials column.


0

I'd break out the perl for this - it's a little more verbose, but hopefully clearer what it's doing? It works single pass, parses the 'id' from the line, and opens a file based on that. It'll actually not create files at all, that would otherwise be empty - I'd call that a feature, but it's easy to change if you don't like it. #!/usr/bin/perl use strict; ...



Top 50 recent answers are included