table_name syntax

Mark Taylor m.b.taylor at bristol.ac.uk
Tue Apr 28 11:43:41 CEST 2015


all,

thanks for the answers.  This has got a bit more involved than
I thought, but I have an answer to the main part of my question,
about table_name.

However, I didn't get an explicit answer to this:

On Mon, 27 Apr 2015, Mark Taylor wrote:

> (b) what is the rule for other TAP_SCHEMA columns like
> schema_name and column_name (and others?)?  Quoting these columns
> would be unnecessary (since there is no possibility of delimited
> parts in this case), but it would seem inconsistent to require
> quoting for some of these metadata columns and not others;
> at least it should be documented explicitly.

I get the sense from Pat's reply that the answer to that is
that column_name and schema_name must not be quoted in the
TAP_SCHEMA tables, but some of the other replies in this
thread (e.g. Dave's raw_schema_name suggestion) seem to suppose
otherwise, so I'm not sure.

To be concrete, consider the following the TAPVizieR query:

   select table_name, column_name
      from tap_schema.columns
      where table_name like '%B/avo.rad/%' and ucd = 'spect.index'

This now returns:

   +-------------------+-------------+
   | table_name        | column_name |
   +-------------------+-------------+
   | B/avo.rad/catalog | Sp-Index    |
   +-------------------+-------------+

I take from this discussion that it should instead return:

   +---------------------+-------------+
   | table_name          | column_name |
   +---------------------+-------------+
   | "B/avo.rad/catalog" | Sp-Index    |
   +---------------------+-------------+

Should it in fact return:

   +---------------------+-------------+
   | table_name          | column_name |
   +---------------------+-------------+
   | "B/avo.rad/catalog" | "Sp-Index"  |
   +---------------------+-------------+

?

(I'd also like to know the same about schema_name, but I can't find any
real examples of schemas with nasty names.)

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