Array element access in ADQL

Walter Landry wlandry at caltech.edu
Mon Jul 24 22:34:06 CEST 2017


Sorry for taking so long to get around to this.

Markus Demleitner <msdemlei at ari.uni-heidelberg.de> wrote:
> I'm much less enthusiastic about introducing array literals into ADQL
> ('{1,2,3}') -- what would these be used for?

SQL 99 uses ARRAY[1,2,3].  It is nice to have some way to construct
arrays in line.  I have a column 'observing_mode' that is '1' for
spectra, and '2' for images.  I can write a query that returns a
string with an expression like

  ARRAY['spectra','image'][observing_mode]

Cheers,
Walter Landry


More information about the dal mailing list