Re: libpq (C++) - Insert binary data - Mailing list pgsql-general

From Vincenzo Romano
Subject Re: libpq (C++) - Insert binary data
Date
Msg-id AANLkTinO61f29RNbiuzdrHJLSYh1fPc5Byn2LSLcHeLY@mail.gmail.com
Whole thread Raw
In response to libpq (C++) - Insert binary data  (GOO Creations <goocreations@gmail.com>)
Responses Re: libpq (C++) - Insert binary data
Re: libpq (C++) - Insert binary data
List pgsql-general
2010/9/30 GOO Creations <goocreations@gmail.com>:
>  Hi there,
>
> I'm sitting for days now, and I can't get this to work:
>
> I want to insert binary data (bytea) into my postgres DB via the c++ libpq.
>
> What I have is a char* (actually a QByteArray) and I want to insert it into
> the DB and the retrieve it from there again.
>
> I can't find any good examples or tutorials online, so can anyone help me
> (or direct met to a tutorial) on how to insert binary data and retrieve it
> again?
>
> Thank you very much
> Christoph

Try chapter  31.3.4 from the v9 documentation.
http://www.postgresql.org/docs/9.0/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING

--
Vincenzo Romano at NotOrAnd Information Technologies
Software Hardware Networking Training Support Security
--
NON QVIETIS MARIBVS NAVTA PERITVS

pgsql-general by date:

Previous
From: GOO Creations
Date:
Subject: libpq (C++) - Insert binary data
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: libpq (C++) - Insert binary data