On Tue, Sep 14, 2010 at 6:01 PM, Julia Jacobson wrote:
> Hello everybody out there using PostgreSQL,
>
> What is the problem with the following C++ code for the extraction of data
> from a BYTEA column to a binary file?
>
> #include
> #include
> #include
> #include
> #include "libpq-fe.h"
> us
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
--
Sent via pgsql-general
Hello everybody out there using PostgreSQL,
What is the problem with the following C++ code for the extraction of
data from a BYTEA column to a binary file?
#include
#include
#include
#include
#include "libpq-fe.h"
using namespace std;
main ()
{
PGconn *conn;
conn = PQconnectdb("hosta