Re: Returning Vector of Pairs with a PostgreSQL C Extension Function

From: TalGloz <glozmantal(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Returning Vector of Pairs with a PostgreSQL C Extension Function
Date: 2018-08-27 13:04:14
Message-ID: 1535375054445-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Stehule wrote
> There are already prepared macros
>
> #define CStringGetTextDatum(s) PointerGetDatum(cstring_to_text(s))
> #define TextDatumGetCString(d) text_to_cstring((text *)
> DatumGetPointer(d))

Thanks for pointing out the macros, for some reason I've missed them.

Best regards,
Tal

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John McKown 2018-08-27 13:20:23 Re: unorthodox use of PG for a customer
Previous Message Pavel Stehule 2018-08-27 12:44:41 Re: Returning Vector of Pairs with a PostgreSQL C Extension Function