Re: [SPAM] COPY command & binary format - Mailing list pgsql-general
From | Moreno Andreo |
---|---|
Subject | Re: [SPAM] COPY command & binary format |
Date | |
Msg-id | 5731D848.1040804@evolu-s.it Whole thread Raw |
In response to | Re: [SPAM] COPY command & binary format (Nicolas Paris <niparisco@gmail.com>) |
Responses |
Re: [SPAM] COPY command & binary format
|
List | pgsql-general |
Il 10/05/2016 13:38, Nicolas Paris ha scritto: <blockquote cite="mid:CA+ssMOSVC-Yu+yQXeLHL3c0+iz4g1PEtRM49cVvQxyNFN3d4sA@mail.gmail.com" type="cite"> 2016-05-10 13:04 GMT+02:00 Moreno Andreo <<a moz-do-not-send="true" href="mailto:moreno.andreo@evolu-s.it" target="_blank">moreno.andreo@evolu-s.it>: <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Il 10/05/2016 12:56, Nicolas Paris ha scritto: <div style="font-family:tahoma,sans-serif;color:rgb(0,51,51)">Hello, <div style="font-family:tahoma,sans-serif;color:rgb(0,51,51)">What is the way to build a binary format (instead of a csv) ? Is there specification for this file ? <a moz-do-not-send="true" href="http://www.postgresql.org/docs/9.5/static/sql-copy.html" target="_blank">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 Â <div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,51,51)">â Fine, this works in this way : postgresql -> binary <div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,51,51)">binary -> postgresql <div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,51,51)">The way I want is : <div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,51,51)">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. <blockquote cite="mid:CA+ssMOSVC-Yu+yQXeLHL3c0+iz4g1PEtRM49cVvQxyNFN3d4sA@mail.gmail.com" type="cite"> <div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,51,51)"> <div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,51,51)">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.-
pgsql-general by date: