Greenplum:尚不支持从 segDB 执行 SQL 语句的函数
当我尝试从 SNE GP 版本中的一个表上设置的插入触发器调用函数时,出现此错误:
ERROR: Functions that execute SQL statements from the segDBs are not yet supported (spi.c:203) (seg0 localhost:50001 pid=5504)
DETAIL:
SQL statement "SELECT DISTINCT min(zasn) FROM zeusasn WHERE zasn IN (SELECT asn FROM asntable where ip >>= '10.29.249.121')"
PL/pgSQL function "eptriggerfn" line 5 at SQL statement
********** Error **********
ERROR: Functions that execute SQL statements from the segDBs are not yet supported (spi.c:203) (seg0 localhost:50001 pid=5504)
SQL state: XX000
Detail:
SQL statement "SELECT DISTINCT min(zasn) FROM zeusasn WHERE zasn IN (SELECT asn FROM asntable where ip >>= '10.29.249.121')"
PL/pgSQL function "eptriggerfn" line 5 at SQL statement
可能是什么原因造成的?触发器+函数与同一数据库中的另一个表完美配合。
提前致谢!
平均值, 基兰
I get this error when I try to call a function from an Insert Trigger set on one of my tables in the SNE GP Edition:
ERROR: Functions that execute SQL statements from the segDBs are not yet supported (spi.c:203) (seg0 localhost:50001 pid=5504)
DETAIL:
SQL statement "SELECT DISTINCT min(zasn) FROM zeusasn WHERE zasn IN (SELECT asn FROM asntable where ip >>= '10.29.249.121')"
PL/pgSQL function "eptriggerfn" line 5 at SQL statement
********** Error **********
ERROR: Functions that execute SQL statements from the segDBs are not yet supported (spi.c:203) (seg0 localhost:50001 pid=5504)
SQL state: XX000
Detail:
SQL statement "SELECT DISTINCT min(zasn) FROM zeusasn WHERE zasn IN (SELECT asn FROM asntable where ip >>= '10.29.249.121')"
PL/pgSQL function "eptriggerfn" line 5 at SQL statement
What can be the cause of this? Triggers + functions are working perfectly fine with another table in the same DB.
Thanks in advance!
Rgds,
Kiran
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于Greenplum跨多个节点进行分布式处理,查询中的查询无法利用完整的处理能力,因此不支持。
当我们进行切换时,我们遇到了类似的问题:
函数
country_name()
基本上对每个 id 进行了子查询以获取国家/地区名称。所以我们不得不将查询更改为:...,问题就解决了。我知道这看起来工作量很大,但好处是值得的。
Because Greenplum does distributed processing across multiple nodes, a query within a query cannot utilise the full processing capability, so it is not supported.
When we made the switch we had a similar problem:
The function
country_name()
basically did a sub query for each id to get the country name. So we had to change the query to:... and the problem was solved. I know it seems like a lot of work, but the benefits are worth it.