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