Re: printing JsonbPair values of input JSONB on server side? - Mailing list pgsql-general

From Michel Pelletier
Subject Re: printing JsonbPair values of input JSONB on server side?
Date
Msg-id CACxu=vJfLY8qAb6YQEK4UNg6zxCoGftS0YY344fcEprZZcwSVQ@mail.gmail.com
Whole thread Raw
In response to Re: printing JsonbPair values of input JSONB on server side?  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: printing JsonbPair values of input JSONB on server side?
Re: printing JsonbPair values of input JSONB on server side?
List pgsql-general
Yeah I'm not sure why you're looping using pointer math, the iterators are there to provide that service.  Another function to check out 'jsonb_each', other than the set returning function parts, it does what it looks like your are trying to do.

-Michel

On Mon, Mar 18, 2019 at 4:12 PM Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
>>>>> "T" == T L <tinlyx@gmail.com> writes:

 T> Below is my test. It prints a strange character instead of "a"; and
 T> says that the value isn't numeric.

Yeah, there's plenty else wrong with your code.

Did you look at how JsonbToCStringWorker does it? that looks like the
best example I can find on a quick scan.

--
Andrew (irc:RhodiumToad)

pgsql-general by date:

Previous
From: Alexandre Arruda
Date:
Subject: Re: recovery_target_time and WAL fetch with streaming replication
Next
From: Radoslav Nedyalkov
Date:
Subject: subscription broken after upgrade to pg11