02-04-2018 06:01 AM
Hi Lukask.
We need to merge multiple gpkg files in one.
For that exist the function "attack database" but have the limitation of 10 files and we need to attack more.
Example:
sqlite3 icgc17.gpkg
attach database 'icgc1.gpkg' as 'icgc1';
...
In sqllite3 exist the constant SQLITE_LIMIT_ATTACHED and aparently is possible to overwrite.
We tried change unsuccessfully
sqlite3_limit(db,SQLITE_LIMIT_ATTACHED,20);
Any idea?
Can you help us?
Best Regards,
Marti.
Solved! Go to Solution.
02-12-2018 04:35 AM
The SQLITE_LIMIT_ATTACHED is a runtime configurable limit which by default is set to 10. The sqlite3_limit(db,SQLITE_LIMIT_ATTACHED,20); is a function invocation you'd need to place in your code linking against the SQLite lib. To change the limit in the sqlite3 shell, you would use:
.limit attached 20
BUT! The SQLITE_LIMIT_ATTACHED has a hard limit that is a compiled constant in the binaries and it's set to 10 as well, so unless you recompile your SQLite binaries with a change SQLITE_MAX_ATTACHED, there is no way to overcome the limit of 10 attached databases.