amazon-redshift - 无效操作: WITH RECURSIVE is not supported

标签 amazon-redshift common-table-expression recursive-query

当我在下面运行查询时,我收到消息:

[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/

相关文章:

oracle - PostgreSQL 和过滤递归查询

python - 使用 IAM 角色使用 Python 连接到 Redshift

amazon-redshift - 用于为频谱 S3 访问创建 IAM 角色的模板

oracle - 使用 CTE Oracle 生成日期范围

sql - 在多个查询中使用 postgres CTE

sql - Oracle:分层查询中的编号组

postgresql - 删除递归 child

sql - Redshift : Serializable isolation violation on table

amazon-web-services - 如何连接到 Amazon Redshift 或 Apache Spark 中的其他数据库?

database - 如何在sql server中查找循环依赖表