当我在下面运行查询时,我收到消息:
[Amazon](500310) Invalid operation: WITH RECURSIVE is not supported;
有人可以解释一下为什么递归函数不起作用吗? (我正在研究亚马逊 Redshift )
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;
最佳答案
官方 Amazon Redshift 文档:Unsupported PostgreSQL Features :
These PostgreSQL features are not supported in Amazon Redshift.
...
...
- Recursive common table expressions
...
关于amazon-redshift - 无效操作: WITH RECURSIVE is not supported,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45287067/