Search Postgresql Archives

Re: [SPAM] COPY command & binary format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 10/05/2016 13:38, Nicolas Paris ha scritto:
2016-05-10 13:04 GMT+02:00 Moreno Andreo <moreno.andreo@xxxxxxxxxx>:
Il 10/05/2016 12:56, Nicolas Paris ha scritto:
Hello,

What is the way to build a binary format (instead of a csv) ? Is there specification for this file ?
http://www.postgresql.org/docs/9.5/static/sql-copy.html
I always create binary files with
COPY table TO 'path/to/file' WITH BINARY

 
​ Fine, this works in this way :
postgresql -> binary
binary -> postgresql

The way I want is :
csv -> binary -> postgresql
Is this just to be quicker or are you going to add some business logic while converting CSV data?
As you mentioned ETL, I assume the second, as I don't think that converting CSV to binary and then loading it to PostgreSQL will be more convenient than loading directly from CSV... as quicker as it can be, you have anyway to load data from CSV.

Binary file format is briefly described in the last part of the doc you linked, under "Binary format", and there's also reference to source files.

And if possible, transforming csv to binary throught java​.
This is beyond my knowledge, ATM. I'm just starting with Java and JDBC is still in the TODO list, sorry... :-)

Cheers
Moreno.-

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux