ADQL using reserved words in tables

Mark Taylor M.B.Taylor at bristol.ac.uk
Thu Nov 14 12:14:54 CET 2019


Ada,

you don't say what service you're using, but I can only see that
table in the ESA Gaia service.

If I run

   select top 10 * from "public".hipparcos_newreduction

it works fine for me.  In fact even if I write

   select top 10 * from public.hipparcos_newreduction

the query works, though it signals a syntax error in the topcat ADQL
entry panel.  In the latter case, you can use the "Sticking plaster"
button at the far right of the lower toolbar to put the quotes in
automatically (that's a fairly recent introduction, so you need a
fairly recent topcat).

Is that the service you're using?  Is the query really failing, 
and if so, what's the error message?

Mark

On Thu, 14 Nov 2019, ada nebot wrote:

> Hi, 
> 
> While performing a tutorial in a VO School we have seen that access through TAP using ADQL 
> on tables/catalogues containing the reserved word public on them was not possible. 
> We tried as stated in the documentation using double quotes around the word and lots of different combinations.  
> But that did not solve the issue. Has anyone a clue on how to do this? 
> 
> Thanks,
> Ada
> 
> Here are the queries we tried: 
> 
> SELECT TOP 10 * FROM public.hipparcos_newreduction
> 
> SELECT TOP 10 * FROM “public”.hipparcos_newreduction
> 
> SELECT TOP 10 * FROM “public.hipparcos_newreduction”
> 
> SELECT TOP 10 * FROM  'public’.hipparcos_newreduction
>> SELECT TOP 10 * FROM  ''public''.hipparcos_newreduction
> and even something like 
> 
> SELECT TOP 10 * FROM  \’public\’.hipparcos_newreduction
>> 
> 
> 

--
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