ADQL using reserved words in tables

ada nebot ada.nebot at astro.unistra.fr
Thu Nov 14 14:04:09 CET 2019


Hi, 

That is what I first thought, and my first check. 

Thanks for all your responses. 

Ada





> On 14 Nov 2019, at 13:56, Carlos Rodrigo <crb at cab.inta-csic.es> wrote:
> 
> Hi
> 
> This could be a very naive and stupid explanation but, just in case, I comment it
> 
> in your previous email you wrote:
> 
> SELECT TOP 10 * FROM “public”.hipparcos_newreduction
> 
> mark wrote:
> 
> select top 10 * from "public".hipparcos_newreduction
> 
> It seems that the double quote symbol is not the same one, ” vs "
> 
> When I wrote the query in topcat using the ” quotation I get an error. But it works well with the ".
> 
> Is there a chance that you were using a computer where the double quote was written with the ”
> symbol instead of " ?
> 
> I often get silly problems with things like that.
> 
> Carlos
> 
> On 14/11/19 13:38, ada nebot wrote:”
>> Hi, 
>> 
>> I’m using the latest version of TOPCAT: V4.6-3
>> Selected the service: https://gea.esac.esa.int/tap-server/tap
>> 
>> I saw indeed the little warning hinting to use double quotes. 
>> It was helpful, since that’s how I learnt at first the word was reserved, and how those should be 
>> treated. But then I wasn’t able to solve the problem with double quotes. 
>> 
>> Now *something* (?) might have changed between the time I wrote the first email and now, 
>> and the exact same ADQL line is working again on that server. 
>> I can’t send you the error message since I can’t reproduce it and I didn’t take a screen shot. 
>> 
>> But I see Jon has pointed out some error too, so I guess it was the same error message. 
>> 
>> Cheers,
>> Ada
>> 
>>> On 14 Nov 2019, at 12:14, Mark Taylor <M.B.Taylor at bristol.ac.uk <mailto:M.B.Taylor at bristol.ac.uk>>
>>> wrote:
>>> 
>>> 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 <mailto:m.b.taylor at bris.ac.uk> +44-117-9288776  http://www.star.bris.ac.uk/~mbt/
>> 
> 



More information about the dal mailing list