CStringGetTextDatum and other conversions in server-side code

Поиск
Список
Период
Сортировка
От
Тема CStringGetTextDatum and other conversions in server-side code
Дата
Msg-id 000401d174d8$3ab1bde0$b01539a0$@andl.org
обсуждение исходный текст
Ответы Re: CStringGetTextDatum and other conversions in server-side code  (Joe Conway <mail@joeconway.com>)
Список pgsql-general

Writing a language handler: pl_language_handler. Need to do a variety of data conversions. One of them is char* C-string to and from Text/Varchar.

 

The include file postgres.h has the macro CStringGetDatum but this is of no use: it’s just a cast.

 

There is a builtin macro CStringGetTextDatum which calls a function and looks like it might work. Questions:

1.       Is this the right function?

2.       Is it OK to use, or are there restrictions?

3.       Does it have friends: are there other conversion functions like this for other data types (decimal, time in particular)?

4.       Is there any particular documentation I can read?

 

Regards

David M Bennett FACS


Andl - A New Database Language - andl.org

 

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Issue enabling track_counts to launch autovacuum in 9.4.5
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Postgresql upgrade 9.5