datatype values in TAP_SCHEMA.columns
Mark Taylor
m.b.taylor at bristol.ac.uk
Wed Jun 4 02:37:45 PDT 2014
Hi TAP implementers,
I've just noticed that there appears to be some confusion about the
values in the "datatype" column of table TAP_SCHEMA.columns.
Some services prefix these with a namespace:
% stilts tapquery sync=true ocmd='clearparams *; tablename ""' adql='select max(table_name) as a_table, max(column_name) as a_column, datatype from TAP_SCHEMA.columns group by datatype' tapurl=http://www.cadc.hia.nrc.gc.ca/tap
+--------------------+--------------------------+----------------+
| a_table | a_column | datatype |
+--------------------+--------------------------+----------------+
| cfht.wideZ | POS | adql:POINT |
| caom2.SIAv1 | position_scale | votable:double |
| ivoa.ObsCore | Z_ML | adql:DOUBLE |
| ivoa.ObsCore | provenance_lastExecuted | adql:TIMESTAMP |
| caom2.Plane | time_axis_function_naxis | adql:BIGINT |
| ivoa.ObsCore | s_region | adql:REGION |
| TAP_SCHEMA.tables | utype | adql:VARCHAR |
| TAP_SCHEMA.columns | Z_FLAGS | adql:INTEGER |
| ivoa.ObsCore | Z_PETRO_RADIUS | adql:REAL |
| ivoa.ObsCore | provenance_inputs | adql:CLOB |
| caom2.SIAv1 | position_naxis | votable:long |
+--------------------+--------------------------+----------------+
and others don't:
% stilts tapquery sync=true ocmd='clearparams *; tablename ""' adql='select max(table_name) as a_table, max(column_name) as a_column, datatype from TAP_SCHEMA.columns group by datatype' tapurl=http://cdatest.cfa.harvard.edu/csctap
+------------+---------------------+----------+
| a_table | a_column | datatype |
+------------+---------------------+----------+
| obi_source | var_sigma_w | DOUBLE |
| obi_source | var_inter_hard_flag | INTEGER |
| obi_source | var_intra_index_w | SMALLINT |
| tables | utype | VARCHAR |
+------------+---------------------+----------+
My reading of TAP sec 2.6.3 is that the non-namespacers are right,
Those in the other camp include GAVO, CADC and ASDC.
I've talked to Markus, and he agrees that he appears to be
doing it wrong.
Am I (taplint) right in flagging use of namespace prefixes in this
context as an error, or can anybody who's doing it like that point
to justification in one of the standards?
A related issue is use of non-database type values (e.g. votable:long
in the above) in this column. I think it's not legal (anyone disagree?),
but I've had a conversation with Pat about this in the past and I
think he has some reason for wanting them in there anyway.
Mark
--
Mark Taylor Astronomical Programmer Physics, Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-9288776 http://www.star.bris.ac.uk/~mbt/
More information about the dal
mailing list