WarrenPY 发表于 2023-12-19 21:46:13

CRM模块报错

Content-Type:application/json; charset=UTF-8, body:..
org.apache.openjpa.persistence.PersistenceException: ERROR: function year(timestamp without time zone) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 9 {prepstmnt 1218325969 SELECT (year(t0.xcreateTime)||month(t0.xcreateTime)), COUNT(t0.xid) FROM public.WCRM_CUSTOMER t0 WHERE (t0.xowneruser = ? AND t0.xowneruser IS NOT NULL AND t0.xcreateTime >= ? AND t0.xcreateTime <= ?) GROUP BY (year(t0.xcreateTime)||month(t0.xcreateTime))}


从应用市场里安装的CRM模块,点进进入报错了,看起来是sql的语法有问题。
我的问题是,是不是这个只兼容mysql的数据库,不兼容postgresql的数据库?

论坛管理员 发表于 2023-12-20 10:40:49

您试试看这段sql语句直接去postgresql的连接工具里测试,可不可用?

WarrenPY 发表于 2023-12-20 14:47:54

我测试过,就是数据库报错了,我数据库的版本是PostgreSQL 14.3 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 12.1.1 20220628 (Red Hat 12.1.1-3), 64-bit,
pgsql里extract(year from t0.xcreateTime)的写法是可以的

论坛管理员 发表于 2023-12-21 10:06:18

这个管理员反馈给研发人员修复中:handshake

WarrenPY 发表于 2023-12-21 13:38:56

等开发修复好,我直接重新安装,覆盖以前的就可以了哇?

论坛管理员 发表于 2023-12-22 09:34:51

是的

WarrenPY 发表于 2023-12-22 18:44:18

好的,谢谢
页: [1]
查看完整版本: CRM模块报错