Invalid operation: WITH RECURSIVE is not supported

流过昼夜 提交于 2020-01-10 05:44:06

问题


When I'm running query below I get message:

[Amazon](500310) Invalid operation: WITH RECURSIVE is not supported;

Can someone explain me why recursive function doesn't work? (I'm working on amazon 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;

回答1:


The official Amazon Redshift documentation: Unsupported PostgreSQL Features:

These PostgreSQL features are not supported in Amazon Redshift.
...
...
- Recursive common table expressions
...



来源:https://stackoverflow.com/questions/45287067/invalid-operation-with-recursive-is-not-supported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!