Greenplum query调用函数报错解决方案
我们可能经常会遇到需要在query调用自定义函数的情况,但是在Greenplum中,如果函数中有query,然后又在query中调用该函数则会报错。 例子: 创建函数 iap=# create or replace function f1() returns text as $$ declare c1 text; begin execute 'select info from tt1 limit 1' into c1; return c1; end; $$ language plpgsql; query中调用: iap=# select f1() from tt1; ERROR: query plan with multiple segworker groups is not supported HINT: likely caused by a function that reads or modifies data in a distributed table CONTEXT: SQL statement 'select info from tt1 limit 1...

