From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Invalid field size |
Date: | 2017-07-04 16:15:16 |
Message-ID: | 46d31c8e-29df-25bc-0293-18766fa3f948@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 07/04/2017 08:37 AM, Moreno Andreo wrote:
> Il 04/07/2017 17:25, Tom Lane ha scritto:
>> Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it> writes:
>>> Il 04/07/2017 16:51, Tom Lane ha scritto:
>>>> Pushing binary data around on Windows is always a hazardous
>>>> proposition.
>>> So what you are saying is "in the last 5 years you've been extremely
>>> lucky?" :-)
>> Yup, particularly now that you mention moving the files between machines.
>> What did you do that with exactly?
> Trying to answer your question (I hope I understood correctly, English
> is not my mother tongue)
> What I do is, given a database, to COPY every table to a file, and then
> pack them up in one with a zip (except this table, that's been excluded
> from compression for its size and consequent compression time), so my
> backup is made up by 2 files, one with "normal data" and one with the
> result of COPYing this table to a file.
>
> A question that comes while I'm writing: but pg_dump with custom format
> is not using COPY with binary format?
A quick look through the source indicates to me that it is not using
BINARY. Then again I am not a C programmer, so take that into account.
It would stand to reason that it would not use BINARY as using
pg_dump/pg_restore is supposed to be portable across OS, machine
architecture and to a certain degree Postgres versions. COPY WITH BINARY
would work against that:
https://www.postgresql.org/docs/9.1/static/sql-copy.html
"The binary format option causes all data to be stored/read as binary
format rather than as text. It is somewhat faster than the text and CSV
formats, but a binary-format file is less portable across machine
architectures and PostgreSQL versions.
>
> Thanks
> Moreno
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2017-07-04 16:25:04 | Re: [SPAM] Re: Invalid field size |
Previous Message | Moreno Andreo | 2017-07-04 16:07:30 | Re: Invalid field size |