table_name syntax
Mark Taylor
M.B.Taylor at bristol.ac.uk
Thu Apr 30 00:49:15 CEST 2015
Laurent,
On Wed, 29 Apr 2015, Laurent Michel wrote:
> Le 29/04/2015 11:18, Mark Taylor a écrit :
>
> > Admittedly, if you need to recover the unqualified and unquoted
> > table name for some reason (I get the impression this is one of
> > Dave's requirements, though I may be wrong)
>
> > it's a bit more fiddly
> > under the current scheme, but it's not impossible, and I would
> > say that's a niche requirement.
> Your are right, it not impossible, but not easy at all. Imagine you get
> viz4.B/avo.rad/wsrt as table name
> Dots might be (or not) path elements separators. Then, if you want to extract
> the table name, you have to look at a schema named viz4 in the column
> schema_table.schema. If there is one you can suppose that viz4.B/avo.rad/wsrt
> has the schema.table form and that the table name is B/avo.rad/wsrt (hoping
> that the table name does not start with viz4)
> That is what I called doing inference.
> My opinion is that forcing clients to do such computation is a clue of some
> weakness in the DB schema.
No, it's not as bad as that. This discussion is complicated by the
fact that TAPVizier is currently returning incorrect values in
the table_name columns. Where it's currently reporting
viz4.B/avo.rad/wsrt
it should be saying instead
viz4."B/avo.rad/wsrt"
(or possibly "viz4"."B/avo.rad/wsrt").
This means that (as long as the service is working properly) it is
possible to parse the table_name string into catalog, schema and table
just by looking at the string itself, and without reference to
the schema name or guesswork.
See my mail to Dave for a concrete prescription.
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