Tom Briggs wrote:

   If you want the Super SQLite GUI Tool and Swiss Army Knife 3000 to
have a POWER function, contact the maintainer of said tool - it's an
application problem.  If you want your application to have the POWER
function, roll your own build of SQLite.  Those are application
problems, not database problems.
But they very quickly become a database problem if you use an user defined function in your database (i.e. in a trigger or view definition). The reference to the function is saved in the database, but the implementation is not. If you transport your database to a different platform (i.e. Win to Linux) or try to use a different application to access the database (perhaps the sqlite shell) your perfectly valid database won't operate correctly anymore.

This basic problem is what prevents user defined extensions from being widely applied. User defined functions and collations can only be used effectively from one application. As a result the things you can do to that application's database files are limited to what that application implements (i.e. you lose the ability to do general browsing or one time maintenance changes using a general purpose database browser utility). If you need the the extra functionality you can use a user defined function, if you need to have ad-hoc access to the database you probably shouldn't use any user defined functions.

Your suggestion above points out one of the problems of non-standard extensions. If I develop a power function (say one that calculates electrical power by multiplying two arguments, a voltage and current) and a GUI browser developer adds a different power function with the same name but which does exponentiation, their function will be used by my database triggers and views without complaint.
And quite frankly I think the real
problem in your example is static linking - If a 3rd party tool links in
SQLite statically, then you're basically stuck with whatever version
they choose, with whatever extensions they add - in other words, you're
using *their* embedded database, not SQLite.  Which is probably as it
should be, but one shouldn't expect SQLite to solve problems for said
application.
I really don't see your point here. If the maintainer releases a new version statically linked to the latest SQLite version the day after it is released (which is often the case), then it is no different than using the sqlite shell (though it may be prettier and provide additional features). There are no problems with the said application.
is the POWER function (or
operator) standard SQL?
No, to the best of my knowledge there is no power function in standard SQL.

Dennis Cote


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to