Re: Accessing structured datatypes using libpq - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Accessing structured datatypes using libpq
Date
Msg-id CAHyXU0zvwDyeEVEnoPQ-9fRrhvRdn8VwHM5taJpGCRSbCwWF5A@mail.gmail.com
Whole thread Raw
In response to Accessing structured datatypes using libpq  (Raimo Jormakka <raimo.jormakka@gmail.com>)
List pgsql-general
On Wed, Jun 11, 2014 at 1:20 AM, Raimo Jormakka
<raimo.jormakka@gmail.com> wrote:
> Hi,
>
> What is the recommended way of accessing structured data-types (especially
> JSONB and HSTORE) using libpq? It seems that by default JSONB data for
> example is returned as text.
>
> Is it not possible to have binary access to these data-types? If it is
> possible, then how do I do it exactly as the only thing I get from libpq is
> a void-pointer?

check out libpqtypes: http://libpqtypes.esilo.com/. it gives C client
side representations of most common types including hstore. jsonb is
not supported yet but the library is pluggable to add support for new
types.

merlin


pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account
Next
From: Steve Crawford
Date:
Subject: iso-8859-1 type name ‘pg_int64’