報錯信息:
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: PL/pgSQL function actv_comp(date,date) line 4 at RETURN QUERY
我們可能經常會遇到需要在query調用自定義函數的情況,但是在Greenplum中,如果函數中有query,然后又在query中調用該函數則會報錯。
例子:
創建函數