pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jtv@xs4all.nl
To: Marvin Bellamy <marvin.bellamy@innovision.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq: Newbie help w/  data type conversions on
Date: Thu, 31 Mar 2005 05:29:04 +0200 (CEST)
Message-ID: <24826.202.47.227.25.1112239744.squirrel@202.47.227.25> (raw)
In-Reply-To: <424ADDC0.8070603@innovision.com>
References: <424ADDC0.8070603@innovision.com>

> 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





view thread (5+ messages)  latest in thread

Message-ID: <24826.202.47.227.25.1112239744.squirrel@202.47.227.25>
Permalink:  ../24826.202.47.227.25.1112239744.squirrel@202.47.227.25/
Also on:    postgresql.org/message-id/24826.202.47.227.25.1112239744.squirrel@202.47.227.25

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jtv@xs4all.nl, marvin.bellamy@innovision.com
  Subject: Re: libpq: Newbie help w/  data type conversions on
  In-Reply-To: <24826.202.47.227.25.1112239744.squirrel@202.47.227.25>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox