Re: Extracting data from BYTEA column to binary file using libpq

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Julia Jacobson" <julia(dot)jacobson(at)arcor(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Extracting data from BYTEA column to binary file using libpq
Date: 2010-09-14 22:37:11
Message-ID: 676f7a06-f77a-4e5a-8b8a-5078634879f7@mm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Julia Jacobson wrote:

> ofstream myFile ("picture.jpg", ios::out | ios::binary);
> myFile.write (contents);

You must specify the number of bytes to write.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2010-09-14 23:55:34 Re: pgpool-II 3.0 + postgres 9rc1 + md5 authentication not working
Previous Message Julia Jacobson 2010-09-14 22:01:18 Extracting data from BYTEA column to binary file using libpq