Re: [sqlite] ANN: user-defined functions

2013-03-27 Thread Jean-Christophe Deschamps
... so I think you must be using a really old copy. That's correct: I downloaded this source years ago. And yes, argc for SQLite functions has a different semantics from main(). Thanks for the heads up. -- j...@antichoc.net

Re: [sqlite] ANN: user-defined functions

2013-03-27 Thread Chris
> At 15:46 25/03/2013, you wrote: > > > The sqrt() function takes only one argument, at least. > > It checks assert( argc==2 ); at line 503 AFAIK. Under some conventions, argc is one more than you might initially expect, so it's worth looking a little deeper. Think of main() and also C

Re: [sqlite] ANN: user-defined functions

2013-03-25 Thread Jay A. Kreibich
On Mon, Mar 25, 2013 at 08:32:12PM +0100, Jean-Christophe Deschamps scratched on the wall: > At 15:46 25/03/2013, you wrote: > > > The sqrt() function takes only one argument, at least. > > It checks assert( argc==2 ); at line 503 AFAIK. Line 503 of the version up on the website is in

Re: [sqlite] ANN: user-defined functions

2013-03-25 Thread Jean-Christophe Deschamps
At 15:46 25/03/2013, you wrote: ´¯¯¯ The sqrt() function takes only one argument, at least. It checks assert( argc==2 ); at line 503 AFAIK. This library also contains several string functions, but it is meant as a general extension library, not a math specific library. I have my

Re: [sqlite] ANN: user-defined functions

2013-03-25 Thread James K. Lowden
On Mon, 25 Mar 2013 08:33:53 + Simon Slavin wrote: > > On 25 Mar 2013, at 3:54am, James K. Lowden > wrote: > > > http://www.schemamania.org/sql/sqlite/udf/ > > Nicely done. Thanks for the notes, Simon. > A) The link for your PDF

Re: [sqlite] ANN: user-defined functions

2013-03-25 Thread Jean-Christophe Deschamps
At some point in time I needed a few math functions and tried to use the contributed maths extension. I found a couple of mistakes, mostly sqrt() requiring two arguments, and something else I can't remember right now. That by itself may indicate that the math functions never went into full

Re: [sqlite] ANN: user-defined functions

2013-03-25 Thread Simon Slavin
On 25 Mar 2013, at 3:54am, James K. Lowden wrote: > http://www.schemamania.org/sql/sqlite/udf/ > > When I started looking into this, I didn't find many examples around > the Web, and there's no HOWTO document on the SQLite website. I > thought by posting some