-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Noah Hart wrote:
> Stored Procedures

Stored procedures don't make sense as a core part of SQLite because there is
no one solution that fits all.  For example what language would you write
them in, and how would you deal with security (blindly loading anything that
 is there wouldn't be a good idea is most situations)?

To implement stored procedures, write them in the language of your choice
and store them in the database with a schema and form of your own choosing
(text/bytecode/binary).  If you are using the C api then use
sqlite3_auto_extension - http://www.sqlite.org/c3ref/auto_extension.html -
to register a callback that is called whenever a new db is opened.  In that
callback you can then grab the stored procedures out of the database, apply
whatever security rules you want and then register/execute them.  If you are
not using C then most of the language bindings provide a way of doing
something substantially similar.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkq0CmAACgkQmOOfHg372QSIzACgywwsjWKAaxFISkyxFioNSVom
LFgAoN/ywQiICU4bwlUfws2+QY/DZx8z
=wdx9
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to