
您好, 目前我公司正在预研基于openGauss -server1.0.1 的服务端扩展开发,基于C语言扩展SQL,C 的动态库已经编译完成,方法也能挂接上。 编写 .sql文件后,调用时出错,文件内容见文后(也可见附件),报错如下: [omm@SMEuler ~]$ gsql -d mydb1 -p 15400 -f /opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql SET BEGIN gsql:/opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql:14: ERROR: type "spheroid" does not exist gsql:/opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql:19: ERROR: current transaction is aborted, commands ignored until end of transaction block gsql:/opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql:27: ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK total time: 102 ms 在postgreSQL中,执行该文件是OK的:psql -d mydb2 -f /opt/PostgreSQL/9.3/share/postgresql/contrib/test.sql 请问:该如何让这个文件执行成功?gsql 和原来psql的区别非常大吗? zhouqin@supermap.com

你好, 请问你的问题有在openGauss官方微信群里面得到回复和解决吗? Best Regards, Edison Xiang ------------------ 原始邮件 ------------------ 发件人: "zhouqin@supermap.com" <zhouqin@supermap.com>; 发送时间: 2021年1月14日(星期四) 下午2:46 收件人: "sqlengine"<sqlengine@opengauss.org>; 主题: [SQLEngine] 您好, 目前我公司正在预研基于openGauss -server1.0.1 的服务端扩展开发,基于C语言扩展SQL,C 的动态库已经编译完成,方法也能挂接上。 编写 .sql文件后,调用时出错,文件内容见文后(也可见附件),报错如下: [omm@SMEuler ~]$ gsql -d mydb1 -p 15400 -f /opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql SET BEGIN gsql:/opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql:14: ERROR: type "spheroid" does not exist gsql:/opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql:19: ERROR: current transaction is aborted, commands ignored until end of transaction block gsql:/opt/huawei/install/app_13b34b53/share/postgresql/extension/test.sql:27: ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK total time: 102 ms 在postgreSQL中,执行该文件是OK的:psql -d mydb2 -f /opt/PostgreSQL/9.3/share/postgresql/contrib/test.sql 请问:该如何让这个文件执行成功?gsql 和原来psql的区别非常大吗? zhouqin@supermap.com
participants (2)
-
xiangxinyong
-
zhouqin@supermap.com