Re: libpq (C++) - Insert binary data
От
GOO Creations
Тема
Re: libpq (C++) - Insert binary data
Дата
Msg-id
4CA4B000.60706@gmail.com
Ответ на
Re: libpq (C++) - Insert binary data (Steve Atkins)
Список
Дерево обсуждения
libpq (C++) - Insert binary data GOO Creations <goocreations@gmail.com>
Re: libpq (C++) - Insert binary data Steve Atkins <steve@blighty.com>
Re: libpq (C++) - Insert binary data GOO Creations <goocreations@gmail.com>
Re: libpq (C++) - Insert binary data Merlin Moncure <mmoncure@gmail.com>
Re: libpq (C++) - Insert binary data GOO Creations <goocreations@gmail.com>
Re: libpq (C++) - Insert binary data John R Pierce <pierce@hogranch.com>
Re: libpq (C++) - Insert binary data Merlin Moncure <mmoncure@gmail.com>
Re: libpq (C++) - Insert binary data Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: libpq (C++) - Insert binary data Vincenzo Romano <vincenzo.romano@notorand.it>
Re: libpq (C++) - Insert binary data GOO Creations <goocreations@gmail.com>
Re: libpq (C++) - Insert binary data Christian Ullrich <chris@chrullrich.net>
Re: libpq (C++) - Insert binary data Vincenzo Romano <vincenzo.romano@notorand.it>
Yes there is a reason I'm not using Qt's libraries. Qt doesn't come out with PSQL as default driver (meaning you have to manually download the driver for Qt postgres). I'm developing a plugin for an app that restricts Qt, no extra depedncies are allowed. But the app has libpq as dependcy, so I'm able to use that. Chris On 2010/09/30 05:38 PM, Steve Atkins wrote: > On Sep 30, 2010, at 8:26 AM, GOO Creations wrote: > >> 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? > Is there any reason you're not using the Qt database API? It'll map onto what you're doing much more easily than using libpq. > > (Also, libpq isn't a C++ API, so maybe you're thinking of something else, like libpqxx?) > > Cheers, > Steve > >
В списке pgsql-general по дате отправления