返回首页

gbase数据、南大通用产品文档:GBase8sGCILobTrim

更新日期:2024年09月11日

函数原型:
Sword GCILobTrim(
GCISvcCtx *svchp,
GCIError *errhp,
GCILobLocator *locp,
ub4 newlen);
功能描述:
大对象数据进行截断。
svchp(输入/输出)
该接口内会自动生成一个当前环境句柄下的上下文句柄,并将地址保存到该指针。
errhp (输入)
错误信息句柄,该接口调用失败时将错误码及错误信息写入该句柄。
Locp (输入/输出)
存贮大对象描述符句柄
lenp(输出)





大对象数据截断后的长度,一般该长度需要大于或等于现有大对象长度。
返回值:
如果执行成功,返回GCI_SUCCESS,否则返回GCI_ERROR

 摘要:
执行由“query”指向的SQL 查询,它应是字符串长度字节“long”
。正常
情况下,字符串必须包含1 条SQL 语句,而且不应为语句添加终结分号(
‘;’

或“\g”
。如果允许多语句执行,字符串可包含由分号隔开的多条语句。
 语法:
int
gbase_real_query(GBASE *gbase, const char *q,
unsigned
long length);
 参数:
 返回值:
如果查询成功,返回0。如果出现错误,返回非0 值。



GBase 8a 程序员手册C API 篇
南大通用数据技术股份有限公司

- 39 -
 错误
CR_COMMANDS_OUT_OF_SYNC
以不恰当的顺序执行了命令。
CR_SERVER_GONE_ERROR

GBase 服务器不可用。
CR_SERVER_LOST


在查询过程中,与服务器的连接丢失。
CR_UNKNOWN_ERROR


出现未知错误。

示例
使用gs_install 脚本进行GBase 8c 安装。
gs_install -X /opt/software/gbase/clusterconfig.xml
Parsing the configuration file.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
begin deploy..
Installing the cluster.
begin prepare Install Cluster..
Checking the installation environment on all nodes.
begin install Cluster..
Installing applications on all nodes.
Successfully installed APP.
begin init Instance..
encrypt cipher and rand files for database.
Please enter password for database:
Please repeat for database:
begin to create CA cert files
The sslcert will be generated in /opt/gbase/cluster/app/share/sslcert/om
Cluster installation is completed.
Configuring.
Deleting instances from all nodes.

GBase 8c 工具参考手册
南大通用数据技术股份有限公司
227
Successfully deleted instances from all nodes.
Checking node configuration on all nodes.
Initializing instances on all nodes.
Updating instance configuration on all nodes.
Check consistence of memCheck and coresCheck on DN nodes.
Successful check consistence of memCheck and coresCheck on all nodes.
Configuring pg_hba on all nodes.
Configuration is completed.
Successfully started cluster.
Successfully installed application.