This all makes eminently good sense; thank you for the explanation.
I have updated the comments
at the head of the file and uploaded a new version, which is now at
http://www.sqlite.org/contrib/download/extension-functions.c?get=25.
Nothing in the code has changed, so there's no reason to download
On Fri, Jun 13, 2008 at 09:43:51AM -0400, Liam Healy scratched on the wall:
> Interesting; I tried it on Debian sid (unstable) and it worked as
> well. I guess the statement in
> http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions that the
> extensions loading mechanism being turned off by de
On Fri, Jun 13, 2008 at 4:31 AM, Alexey Pechnikov <[EMAIL PROTECTED]> wrote:
>> The extension-functions file doesn't actually implement any of the
>> math functinos, it simply acts as a glue layer between SQLite and the
>> system math library. In this case, it looks like the run-time linker
> The extension-functions file doesn't actually implement any of the
> math functinos, it simply acts as a glue layer between SQLite and the
> system math library. In this case, it looks like the run-time linker
> that loads the extension can't resolve the call for log() from the
> exten
On Thu, Jun 12, 2008 at 04:26:13PM +0400, Alexey Pechnikov scratched on the
wall:
> В сообщении от Friday 06 June 2008 03:51:38 P Kishor написал(а):
> > http://sqlite.org/contrib/download/extension-functions.c?get=22
>
> $ wget http://sqlite.org/contrib/download/extension-functions.c?get=22
> $ m
> Note: You cannot use these functions from the sqlite3 program, you
> must write your own program using the sqlite3 API, and call
> sqlite3_enable_load_extension. See "Security Considerations" in
> http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions.
I can load other extensions and use them.
In the file you have downloaded, there is the following statement:
Note: You cannot use these functions from the sqlite3 program, you
must write your own program using the sqlite3 API, and call
sqlite3_enable_load_extension. See "Security Considerations" in
http://www.sqlite.org/cvstrac/wiki?p=Lo
В сообщении от Friday 06 June 2008 03:51:38 P Kishor написал(а):
> http://sqlite.org/contrib/download/extension-functions.c?get=22
$ wget http://sqlite.org/contrib/download/extension-functions.c?get=22
$ mv extension-functions.c?get=22 extension-functions.c
$ gcc -fPIC -shared extension-functions.
On 6/5/08, BareFeet <[EMAIL PROTECTED]> wrote:
> > requires square root and I'm not sure if I can do this with sqlite.
> > Something like:
> >
> > SELECT PlaceName, sqrt((PlaceX - 1)^2 - (PlaceY - 3)^2) AS
> > DistFromHome
> > FROM Table WHERE PlaceGroup = 3;
>
>
> I was going to suggest using
On Thu, Jun 05, 2008 at 03:55:44PM -0700, Scott Baker scratched on the wall:
> I have a database with coordinates in it. I'd like to calculate distance at
> the SQL level, but the equation for calculating distance requires square
> root and I'm not sure if I can do this with sqlite. Something lik
> requires square root and I'm not sure if I can do this with sqlite.
> Something like:
>
> SELECT PlaceName, sqrt((PlaceX - 1)^2 - (PlaceY - 3)^2) AS
> DistFromHome
> FROM Table WHERE PlaceGroup = 3;
I was going to suggest using "^ 0.5" for square root, but now I see
that SQLite doesn't eve
You can do your own custom functions using the C extentions. You should buy
the book.
"The Definitive Guide SQLite"
On Thu, Jun 5, 2008 at 6:55 PM, Scott Baker <[EMAIL PROTECTED]> wrote:
> I have a database with coordinates in it. I'd like to calculate distance at
> the SQL level, but the equation
I have a database with coordinates in it. I'd like to calculate distance at
the SQL level, but the equation for calculating distance requires square
root and I'm not sure if I can do this with sqlite. Something like:
SELECT PlaceName, sqrt((PlaceX - 1)^2 - (PlaceY - 3)^2) AS DistFromHome
FROM T
> On 4/4/07, Nathan Biggs <[EMAIL PROTECTED]> wrote:
> Does anyone know if there is a floor function in sqlite, or of a way to
> implement it.
>
Well, the suggestions about extending SQLite are probably quicker, but if a SQL
solution is required for portability, you can try something like this:
Please see http://sqlite.org/contrib under extension-functions.tgz.
On 4/4/07, Nathan Biggs <[EMAIL PROTECTED]> wrote:
Does anyone know if there is a floor function in sqlite, or of a way to
implement it.
yes you can implement math functions with user defined functions by the
sqlite3_create_function. sqlite.org is your freind :)
2007/4/4, Nathan Biggs <[EMAIL PROTECTED]>:
Does anyone know if there is a floor function in sqlite, or of a way to
implement it.
Does anyone know if there is a floor function in sqlite, or of a way to
implement it.
17 matches
Mail list logo