Re: Accessing structured datatypes using libpq

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Raimo Jormakka <raimo(dot)jormakka(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Accessing structured datatypes using libpq
Date: 2014-06-11 18:08:04
Message-ID: CAHyXU0zvwDyeEVEnoPQ-9fRrhvRdn8VwHM5taJpGCRSbCwWF5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 11, 2014 at 1:20 AM, Raimo Jormakka
<raimo(dot)jormakka(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2014-06-11 18:14:41 unknown type name ‘pg_int64’
Previous Message Raymond O'Donnell 2014-06-11 17:55:37 Re: Cannot start Postgresql 9.3 as a service in Windows 2012 Server with a domain account