Re: [GSoC] json helper functions

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Charles Cui <charles(dot)cui1984(at)gmail(dot)com>
Cc: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, Aleksandr Parfenov <a(dot)parfenov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: [GSoC] json helper functions
Date: 2018-05-30 11:26:11
Message-ID: CAA8=A78XL+B14zAG9TFP4+6MVkU9Jsf4yLEXzGKBKFC+rnkZ6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 30, 2018 at 12:42 AM, Charles Cui <charles(dot)cui1984(at)gmail(dot)com> wrote:
> Hi mentors and hackers,
>
> I am working on providing a new plugin where creates new data type
> (thrift). What I am currently planning is to translate cstring to byte for
> thrift_in functions. The cstring should be json format. When I looking at
> json helper functions I find the header
>
> ./include/server/utils/json.h
>
> where all functions have the signature of Datum
> function(PG_FUNCTION_ARGS).This signature causes extra overhead when writing
> the code because I need to convert my intermediate variables to the required
> format. Wondering are there any json helpers that are used by postgresql and
> plugins can directly call?
>
>

See the DirectFunctionCall macros. There are lots of examples in the code.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Geoff Winkless 2018-05-30 12:23:36 Re: Is a modern build system acceptable for older platforms
Previous Message REIX, Tony 2018-05-30 09:50:45 PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode