Re: libpq: Newbie help w/ data type conversions on

Поиск
Список
Период
Сортировка
От jtv@xs4all.nl
Тема Re: libpq: Newbie help w/ data type conversions on
Дата
Msg-id 24826.202.47.227.25.1112239744.squirrel@202.47.227.25
обсуждение исходный текст
Ответ на libpq: Newbie help w/ data type conversions on queries and updates  (Marvin Bellamy <marvin.bellamy@innovision.com>)
Ответы Re: libpq: Newbie help w/ data type conversions on  (Marvin Bellamy <marvin.bellamy@innovision.com>)
Список pgsql-interfaces
> I'm coming from a Java background, so I'm relatively new to C/C++ in
> general.  I want to convert the data retrieved from a field to an
> "external" data type I can use; specifically a datetime or a timestamp.
> It looks like the only option for retrieving field data is as raw bytes,
> but I haven't found any information on mapping those byte streams to
> structures.

Actually, values are delivered as C-style strings by default.  So it may
help get a feel for things if you print a few of them out to the console.


> Also, is there any sort of a libpq API, or are you just stuck with
> perusing header files?

In C and C++, header files are normally the way to define an API.


> I had zero luck following the build instructions for libpqxx on Windows,
> so it looks like libpq is my only option for now.

Perhaps that can be fixed.  What problems did you run into, and using
which compiler exactly?


Jeroen




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: DBD::Pg 1.41 beta testers needed
Следующее
От: Marvin Bellamy
Дата:
Сообщение: Re: libpq: Newbie help w/ data type conversions on