ADQL-2.1 internal draft

Walter Landry wlandry at caltech.edu
Fri Jun 12 23:03:51 CEST 2015


Marco Molinaro <molinaro at oats.inaf.it> wrote:
> Hi Walter,
> 
> 2015-06-12 20:42 GMT+02:00 Walter Landry <wlandry at caltech.edu>:
>> Marco Molinaro <molinaro at oats.inaf.it> wrote:
>>> 2015-06-11 0:05 GMT+02:00 Walter Landry <wlandry at caltech.edu>:
>>>> I am not suggesting removing the 2.0 version with a coordinate system.
>>>> I am suggesting adding an overload and not having an implicit meaning
>>>> for an empty string.  That would retain the property of the current
>>>> proposal that all 2.0 queries are valid in 2.1, but not all 2.1
>>>> queries are valid in 2.0.
>>>
>>> but while function overload is managed by postgresql, it's not in
>>> MySQL -e.g.-.
>>
>> The guy down the hall from me who hacks on MySQL says he does this
>> exact thing all the time.  This link
>>
>>   https://dev.mysql.com/doc/refman/5.1/en/udf-arguments.html
> 
> Letting apart that mine was an example, I haven't checked all DBMSes
> This doc page refers to reading number and type of arguments.
> Overload of UDFs is not supported in MySQL, don't ask me why.
> It's true that maybe if you hack the engine you can do something,
> don't now, never tried.

It does not require hacking the engine.  You define a single UDF that
takes a variable number of arguments.  Inside the UDF, you check the
arity and do the appropriate thing.

> In any case, I think that the overloading proposed to solve the
> empty string to be deprecated is not an easy solution. What you say
> can be used server side when receiving a call to the service (but
> this can also be declared by the VERSION parameter), but you need
> then a workaround client side, that has to find a way to define
> which version the server speaks, and this will become more
> complicated if you want to make a call to multiple services at one
> time.

We have all the same problems if an empty string is suddenly valid for
coordinate systems.  The difference is that overloading is easier for
the end-user to understand.  And it is easy to parse.

Cheers,
Walter Landry


More information about the dal mailing list