Re: Returning Vector of Pairs with a PostgreSQL C ExtensionFunction - Mailing list pgsql-general

From TalGloz
Subject Re: Returning Vector of Pairs with a PostgreSQL C ExtensionFunction
Date
Msg-id 1535375054445-0.post@n3.nabble.com
Whole thread Raw
In response to Re: Returning Vector of Pairs with a PostgreSQL C Extension Function  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Returning Vector of Pairs with a PostgreSQL C Extension Function
Next
From: John McKown
Date:
Subject: Re: unorthodox use of PG for a customer