Search Postgresql Archives

CStringGetTextDatum and other conversions in server-side code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux