当我在下面运行查询时,我收到消息:
[Amazon](500310) Invalid operation: WITH RECURSIVE is not supported;
有人能解释一下为什么递归函数不起作用? (我正在研究亚马逊红移)
WITH RECURSIVE r AS (
SELECT
1 AS i,
1 AS factorial
UNION
SELECT
i+1 AS i,
factorial * (i+1) as factorial
FROM r
WHERE i < 10
)
SELECT * FROM r;
答案 0 :(得分:2)
官方Amazon Redshift文档:Unsupported PostgreSQL Features:
Amazon Redshift不支持这些PostgreSQL功能。
... ... ... - 递归公用表表达式
...
答案 1 :(得分:0)