SQLite Forum

Write large blob, > 2GB
Login
I take it, then, that the envisioned easier approach is that clients do the potentially overflowing arithmetic (were 32-bit integers to be used) with 64-bit integers, which are then passed to the sqlite3_something64() API where the possibly over-big values are checked against SQLITE_MAX_LENGTH or its lowered runtime value, whereupon the call fails for bigger values and might succeed otherwise.

I supposed, if that check is done in many places within an application, there could be some saving relative to just doing the same check in application code. However, it seems that checking for a SQLITE_TOOBIG error and comparing a derived value against the runtime value of SQLITE_MAX_LENGTH (sqlite3_limit() return) are similarly simple.

Those sqlite3_bind_{blob,text,zeroblob}64(...) APIs are suggestive of a new capability (as the OP incorrectly surmised) in part because they are not otherwise mentioned at the [binding API doc](https://sqlite.org/c3ref/bind_blob.html).