Keith Medcalf, on Thursday, December 5, 2019 02:24 PM, wrote... > On Thursday, 5 December, 2019 11:39, Jose Isaias Cabrera, on > >Just to be sure... > > > >The function, > > > >int sqlite3_enable_load_extension(sqlite3 *db, int onoff); > > > >enables or disables a database to allow or disallow the loading of > >extensions[1]. Once it's set, will it stay on? Or does one need to be > >turn it on every time one connects to the database? It appears that the > >latter is the correct behavior, but I just want to make sure. Thanks. > > Each time a connection is opened the default setting of the load_extension > flag is > set according the SQLITE_ENABLE_LOAD_EXTENSION compile time define, which > defaults to 0. > > Using either the sqlite3_enable_load_extension or sqlite3_db_config makes a > change > to the setting for that connection only which remains in effect until the > connection > is closed or the configuration of the connection is changed again (using the > same API > calls). Each connection needs to enable the loading of extensions separately > and the > change only applies to that connection. (It applies to the connection, not > the database) > > See also: https://sqlite.org/c3ref/load_extension.html
Thanks. Yes, I saw the load extension text, but somehow it left me thinking that it was a setting per DB and not per connection. All clear now. Thanks. josé _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users