[TAP] field name attribute == column name

Patrick Dowler patrick.dowler at nrc-cnrc.gc.ca
Mon Apr 27 23:57:35 PDT 2009


On Monday 27 April 2009 21:21:28 Francois Ochsenbein wrote:
> Well, SQL does not place any restriction on column names
> when names are enclosed within double quotes.
> This way also keeps the case of column names, i.e.
>   select "x", "X", "M/L" from mytable
> is perfectly legal in SQL, and refers to 3 different columns.
> Therefore quoting the FIELD's name attribute should work.
> I'm not sure what happens if the name contains a quote, but
> I guess the double-quoting is legal, e.g. a column named mag(r=5")
> would become "mag(r=5"")" in the SQL command.
>
> Personnally I would prefer the quoting way rather than imposing
> contraints on column names (other than unicity within a single table).

Oh... I had forgotten about this feature since I never really make use of it. 
I just checked and one can also create tables with quoted column names, so 
while we can say "legal ADQL column name" it is in fact much less of a 
restriction than I thought and name attributes intended for display could be 
used as column names. So nothing to do/change.

thanks for the reminder :)

-- 

Patrick Dowler
Tel/Tél: (250) 363-0044
Canadian Astronomy Data Centre
National Research Council Canada
5071 West Saanich Road
Victoria, BC V9E 2M7

Centre canadien de donnees astronomiques
Conseil national de recherches Canada
5071, chemin West Saanich
Victoria (C.-B.) V9E 2M7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/dal/attachments/20090427/9779742a/attachment-0003.html>


More information about the dal mailing list