Re: Returning Vector of Pairs with a PostgreSQL C ExtensionFunction

Поиск
Список
Период
Сортировка
От TalGloz
Тема Re: Returning Vector of Pairs with a PostgreSQL C ExtensionFunction
Дата
Msg-id 1535373637716-0.post@n3.nabble.com
обсуждение исходный текст
Ответ на Re: Returning Vector of Pairs with a PostgreSQL C ExtensionFunction  (TalGloz <glozmantal@gmail.com>)
Ответы Re: Returning Vector of Pairs with a PostgreSQL C Extension Function  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general
It looks like changing the

elements[0] = CStringGetDatum(localT1.c_str()); 
elements[1] = CStringGetDatum(localT2.c_str()); 

to:

elements[0] = PointerGetDatum(cstring_to_text(localT1.c_str()));
elements[1] = PointerGetDatum(cstring_to_text(localT2.c_str()));

Solved the problem. If anyone thinks that there is a better way please tell
me.

Best regards,
Tal



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


В списке pgsql-general по дате отправления:

Предыдущее
От: TalGloz
Дата:
Сообщение: Re: Returning Vector of Pairs with a PostgreSQL C ExtensionFunction
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Returning Vector of Pairs with a PostgreSQL C Extension Function