返回首页

gbase数据、南大通用产品文档:GBase8a纯gnode 节点

更新日期:2024年09月11日

/opt/192.168.146.40/gbase_profile
export
GBASE_BASE=/opt/192.168.146.20/gnode
export
GBASE_HOME=/opt/192.168.146.20/gnod
e/server
export GBASE_SID=gbase
export GCLUSTER_USER=gbase
export TCMALLOC_AGGRESSIVE_DECOMMIT=1
ulimit -v unlimited
unset TERMINFO
export
TERMINFO_DIRS=/opt/192.168.146.20/gclu
ster/server/share/terminfo:/opt/192.16

stcopy() 函数将以空终止的字符串从内存中一个位置复制至另一位置。

语法

void stcopy(from, to)
char *from, *to;
from
指向您想要 stcopy() 复制的以空终止的字符串的指针。
to
指向内存中 stcopy() 复制字符串的位置的指针。

示例

此样例程序在 demo 目录中的 stcopy.ec 文件中。
/*
* stcopy.ec *

This program displays the result of copying a string using stcopy().
*/

#include

main()
{
static char string[] = "abcdefghijklmnopqrstuvwxyz";

printf("STCOPY Sample ESQL Program running.\n\n");

printf("Initial string:\n [%s]\n", string);
/* display dest */
stcopy("John Doe", &string[15]); /* copy */

GBase 8s ESQL/C 编程指南
南大通用数据技术股份有限公司
- 957 -
printf("After copy of 'John Doe' to position 15:\n [%s]\n",
string);

printf("\nSTCOPY Sample Program over.\n\n");
}
输出

STCOPY Sample ESQL Program running.

Initial string:
[abcdefghijklmnopqrstuvwxyz]
After copy of 'John Doe' to position 15:
[abcdefghijklmnoJohn Doe]

STCOPY Sample Program over.

参数说明:cm_server 主备连接超时时间。
取值范围:整型,单位为秒。修改后需要重启cm_server 才能生效。参数修改请参考表

GBase 8c V5 开发者手册
南大通用数据技术股份有限公司
1397
GUC 参数设置方式进行设置。
默认值:2