ADQL using reserved words in tables
Jon Juaristi Campillo
juaristi at uni-heidelberg.de
Thu Nov 14 14:07:16 CET 2019
On 19/11/14 11:52, Gregory MANTELET wrote:
> A little correction here: `public` is the default schema....in Postgres
> databases. It is not the default schema in ADQL/TAP.
True. Truth be told, it is the only case I am aware of where `public`
can be used, and schemas in other DBMS are completely different things
(Oracle, MySQL).
So, yes, that mistake is on me. Sorry for the misunderstanding.
> Indeed, it should work in this particular case.
> In ADQL/TAP, it is not always required to prefix with the schema name.
> You must absolutely do it only in case of ambiguous table name (e.g.
> tables `public.stuff` and `another.stuff`)....am I wrong?
>
> As far as I understood, `TAP_SCHEMA.tables.table_name` should contain
> the recommended way to reference a table. I tend to think that the
> "recommended way" should always be the simplest as possible (for non
> `TAP_SCHEMA` tables)...which means no schema prefix if not needed.
You must absolutely use it to avoid ambiguity, of course.
The issue with “simplest as possible” is, I think, that in some cases
the schema name can also be really helpful in order to know which data
is being queried, even when unnecessary. It doesn't really do any damage
to use it.
Cheers,
Jon.
--
Jon Juaristi Campillo web: http://gaia.ari.uni-heidelberg.de
Astronomisches Rechen-Institut mail: juaristi at uni-heidelberg.de
Moenchhofstrasse 12-14 tel: +49 6221 54-1849
69120 Heidelberg, Germany fax: +49 6221 54-1888
More information about the dal
mailing list