On Thu, 14 Dec 2023 05:39:58 -0800 (PST), Elham Peiravian wrote:
> Hello,
>
> I have a table in which I want to insert into 500 Linestring feature
> rows at a time. I need to this to be done recursively until all rows
> have been inserted. I had thought using a Trigger will do just that,
> but what I have so far only inserts 500 rows and then stops. What am
> I
> missing here?
>
> PRAGMA recursive_triggers = ON;
>
I'll quote what the SQLite documentation says:
"the recursive_triggers setting affects the execution of all statements
prepared using the database connection.
....
... statements prepared using the legacy sqlite3_prepare() interface
...
...
The depth of recursion for triggers has a hard upper limit set by the
SQLITE_MAX_TRIGGER_DEPTH compile-time option and a run-time limit set
by sqlite3_limit(db,SQLITE_LIMIT_TRIGGER_DEPTH,...)"
Apparently it only works for programs using the C API for
prepared statements.
Furthermore, there are limits to respect.
Having said that, I don't know what else to say because
I personally have never used recursive triggers.
In any case it's a problem that has nothing to do with
SpatiaLite, it's all depending on SQLite.
You can try posting a message on their mailing list.
bye Sandro