更新时间:2024-03-21 GMT+08:00
分享

GAUSS-00191 -- GAUSS-00200

GAUSS-00191: "recursive query '%s' column %d has collation '%s' in non-recursive term but collation '%s' overall"

SQLSTATE: 42P21

错误原因:递归查询中的列的字符集和非递归查询的列的字符集不一致。

解决办法:将非递归查询的输出字符集转换成递归查询的输出字符集。

示例:

1
2
3
4
5
6
7
8
9
postgres=# WITH RECURSIVE foo(x) AS
postgres-#    (SELECT x FROM (VALUES('a' COLLATE "C"),('b')) t(x)
postgres(#    UNION ALL
postgres(#    SELECT (x || 'c') COLLATE "POSIX" FROM foo WHERE length(x) < 10)
postgres-# SELECT * FROM foo;
ERROR:  recursive query "foo" column 1 has collation "C" in non-recursive term but collation "POSIX" overall
LINE 2:    (SELECT x FROM (VALUES('a' COLLATE "C"),('b')) t(x)
                   ^
HINT:  Use the COLLATE clause to set the collation of the non-recursive term.

GAUSS-00192: "WITH query '%s' has %d columns available but %d columns specified"

SQLSTATE: 42P10

错误原因:递归查询中指定的参数个数和实际的查询需要的参数个数不一致。

解决办法:递归查询中指定的参数个数和实际的查询需要的参数个数要一致。

GAUSS-00193: "mutual recursion between WITH items is not implemented"

SQLSTATE: 0A000

错误原因:各个查询之间相互递归没有实现。

解决办法:请勿使用没有实现的功能。

GAUSS-00194: "recursive query '%s' must not contain data-modifying statements"

SQLSTATE: 42P19

错误原因:递归查询包含非查询语句。

解决办法:递归查询只能包含查询语句。

GAUSS-00195: "recursive query '%s' does not have the form non-recursive-term UNION [ALL] recursive-term"

SQLSTATE: 42P19

错误原因:递归查询语句的各个查询之间没有使用union。

解决办法:递归的各个查询之间必须是union操作。

GAUSS-00196: "missing recursive reference"

SQLSTATE: XX000

错误原因:系统内部错误。

解决办法:请联系技术支持工程师提供技术支持。

GAUSS-00197: "ORDER BY in a recursive query is not implemented"

SQLSTATE: 0A000

错误原因:递归查询中使用了order by。

解决办法:递归查询中使用order by没有实现。

GAUSS-00198: "OFFSET in a recursive query is not implemented"

SQLSTATE: 0A000

错误原因:不支持的语法。

解决办法:修改SQL Statement。

GAUSS-00199: "LIMIT in a recursive query is not implemented"

SQLSTATE: 0A000

错误原因:递归查询中使用了limit。

解决办法:递归查询中使用limit没有实现。

GAUSS-00200: "FOR UPDATE/SHARE in a recursive query is not implemented"

SQLSTATE: 0A000

错误原因:递归查询中使用了FOR UPDATE/SHARE。

解决办法:递归查询中使用FOR UPDATE/SHARE没有实现。

分享:

    相关文档

    相关产品