无效的操作:不支持WITH RECURSIVE [英] Invalid operation: WITH RECURSIVE is not supported

查看:210
本文介绍了无效的操作:不支持WITH RECURSIVE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When I'm running query below I get message:

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

有人可以解释一下为什么递归函数不起作用吗? (我正在研究Amazon redshift)

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;

推荐答案

Amazon Redshift官方文档:

The official Amazon Redshift documentation: Unsupported PostgreSQL Features:

Amazon Redshift不支持这些PostgreSQL功能.
...
...
-递归公用表表达式
...

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

这篇关于无效的操作:不支持WITH RECURSIVE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆