gpt4 book ai didi

recursion - 如何设置SQLITE_MAX_TRIGGER_DEPTH?

转载 作者:行者123 更新时间:2023-12-02 21:03:51 25 4
gpt4 key购买 nike

我需要增加 SQLite 中递归触发器的最大深度。我知道我需要将 SQLITE_MAX_TRIGGER_DEPTH 设置为我想要的值,但我找不到方法来执行此操作。

我尝试了PRAGMA SQLITE_MAX_TRIGGER_DEPTH = X,但效果不佳。

知道如何设置这个变量吗?谢谢!

引用 SQLite 文档:

SQLite limits the depth of recursion of triggers in order to prevent a statement involving recursive triggers from using an unbounded amount of memory.

Prior to SQLite version 3.6.18, triggers were not recursive and so this limit was meaningless. Beginning with version 3.6.18, recursive triggers were supported but had to be explicitly enabled using the PRAGMA recursive_triggers statement. Beginning with version 3.7.0, recursive triggers are enabled by default but can be manually disabled using PRAGMA recursive_triggers. The SQLITE_MAX_TRIGGER_DEPTH is only meaningful if recursive triggers are enabled.

The default maximum trigger recursion depth is 1000.

最佳答案

PRAGMA recursive_triggers 仅用于启用递归触发器。

SQLITE_MAX_TRIGGER_DEPTH 参数是一个 C 预处理器符号,在编译 SQLite 本身时必须设置;在运行时增加它是不可能的。

关于recursion - 如何设置SQLITE_MAX_TRIGGER_DEPTH?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12713188/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com