On Thursday, 5 December, 2019 11:39, Jose Isaias Cabrera <jic...@outlook.com> 
asked:

>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

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.





_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to