如何将 c 字符串转换为 Vstring vertica?

How to convert c string into Vstring vertica?

我正在为 Vertica 编写用户定义函数,但不知道如何从 C 字符串 (char *) 初始化 Vertica 的 Vstring。感谢您提出任何建议?

遵循 Vertica 文档:

You cannot create instances of VString or VNumeric yourself. You can manipulate the values of existing objects of these classes that HP Vertica passes to your UDx, and extract values from them. However, only HP Vertica can instantiate these classes.