ADQL-2.1 internal draft

Walter Landry wlandry at caltech.edu
Wed Jun 10 21:46:41 CEST 2015


Walter Landry <wlandry at caltech.edu> wrote:
> Markus Demleitner <msdemlei at ari.uni-heidelberg.de> wrote:
>> On Tue, Jun 09, 2015 at 04:53:26PM -0700, Walter Landry wrote:
>>> 4) Can we put the math and trig functions into the optional
>>>    components?  Most of them are not implemented in sqlite.
>> 
>> ...but they're reasonably easy to retrofit, no?  In general, I'm
>> against optional features, as they are a big liability on
>> clients/users (that have to figure out where they are available).
>> The code for adding trig to sqlite only needs to be written once, on
>> the other hand (probably already has several times).
> 
> After a little wandering through the internet, I found
> 
>   http://sqlite.org/contrib/download/extension-functions.c?get=25
> 
> which implements most of these functions.  A little more work for me
> (grumble, grumble), but not so bad.

After a little more investigation, I still have a question about
rand(x).  The definition of rand(x) says that it uses x for the seed.
Shouldn't there be a way to call rand() without setting a seed?
Otherwise, if I write

  select rand(314), rand(278), ra, dec from my_quasars

it is not clear whether I get the same random numbers on each row.

Thanks,
Walter Landry


More information about the dal mailing list