[TAP] field name attribute == column name
Francois Ochsenbein
francois at vizier.u-strasbg.fr
Mon Apr 27 21:21:28 PDT 2009
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).
Cheers, francois
>
>VOTable is a general container. It is reasonable for a specific
>application such as TAP to place additional constraints on the
>contents of a VOTable, such as what is allowed for NAME. It seems
>clear that we do need to do so in order to use VOTable for table
>uploads (probably there will be some other restrictions as well).
>
>> In the general case, VOTables will have to be
>> modified before upload to TAP (unless they come from another TAP service)...
>> is that good enough?
>
>I think that VOTables intended for uploading tables to TAP will be
>specifically generated for this purpose.
>
> - Doug
>
>
>On Mon, 27 Apr 2009, Patrick Dowler wrote:
>
>>
>>
>> We recently discussed using the name attribute of FIELD to map directly to
>> the column name, in both directions. In a result table, the name attributes
>> contain the name(s) or column alias(es). This places a limitation on legal
>> values for the name attribute: it must be a legal ADQL column name. If a
>> VOTable is uploaded to a TAP service, the caller can assume the name(s) are
>> the column names and use them in the query.
>>
>>
>> However, in other uses of VOTable, the name is used as something to display
>> to users, which inevitably means that VOTables made by other services and
>> for other purposes will not generally have name(s) that satisfy the more
>> strict "ADQL column name requirement".
>>
>>
>> Example: We are developing a web interface that uses VOTable for content,
>> and we want both nice display and tables that are usable with TAP. Is there
>> any way to achieve this? In the general case, VOTables will have to be
>> modified before upload to TAP (unless they come from another TAP service)...
>> is that good enough?
>>
>>
>> --
>>
>>
>> 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
>>
=======================================================================
Francois Ochsenbein ------ Observatoire Astronomique de Strasbourg
11, rue de l'Universite 67000 STRASBOURG Phone: +33-(0)390 24 24 29
Email: francois at astro.u-strasbg.fr (France) Fax: +33-(0)390 24 24 17
=======================================================================
More information about the dal
mailing list