Parsing COPY ... WITH BINARY

From: Leonardo M(dot) Ramé <l(dot)rame(at)griensu(dot)com>
To: PostgreSql-general <pgsql-general(at)postgresql(dot)org>
Subject: Parsing COPY ... WITH BINARY
Date: 2013-01-31 14:47:23
Message-ID: 20130131144723.GA4044@leonardo-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using this:

COPY( select field1, field2, field3 from table ) TO 'C://Program Files/PostgreSql//8.4//data//output.dat' WITH BINARY

To export some fields to a file, one of them is a ByteA field. Now, I
need to read the file with a custom made program.

How can I parse this file?

BTW: I cannot export as CSV, because the binary data is modified when I
do that.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-01-31 14:47:34 Re: naming of wal-archives
Previous Message Magnus Hagander 2013-01-31 14:11:01 Re: Version numbers for binaries