Re: Accessing structured datatypes using libpq

From: Raimo Jormakka <raimo(dot)jormakka(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Accessing structured datatypes using libpq
Date: 2014-06-11 09:59:33
Message-ID: CAMZtG2tJ-bNB3EOEi8rbmzgBzys9GaA1-UbAyweYbH5mbEZBaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2014-06-11 9:44 GMT+03:00 John R Pierce <pierce(at)hogranch(dot)com>:

> On 6/10/2014 11:20 PM, Raimo Jormakka wrote:
>
>>
>> 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?
>>
>
> those are text data types. there is no binary representations.

Can someone elaborate this a bit? Isn't the key distinction between the
JSONB and JSON data-types the fact that the former is a binary format while
the latter one is text-based?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Kiran 2014-06-11 10:50:27 eclipse-postgres
Previous Message John R Pierce 2014-06-11 06:44:26 Re: Accessing structured datatypes using libpq