TODO statement

Stefan Manegold Stefan.Manegold at cwi.nl
Mon Sep 30 17:26:28 CEST 2013



----- Original Message -----
> 
> On Sep 30, 2013, at 16:41, Gijs Molenaar wrote:
> 
> > Hi MonetDB people,
> > 
> > I encountered this TODO message while running a query:
> > 
> > sql>SELECT objects.name
> > more>        FROM sys.keys, sys.objects, sys.tables, sys.schemas
> > more>        WHERE sys.keys.id = objects.id
> > more>        AND keys.table_id = tables.id
> > more>        AND tables.schema_id = schemas.id
> > more>        AND keys.type = 0
> > more>        AND tables.id = 11323;
> > TODO: column names of level >= 3
> 
> True, I have seen this TODO msg somewhere in the SQL code.
> Just replace sys.keys.id with keys.id

If that's ambiguous (e.g., there's more than one "keys" table in different schemas
--- unlikely in the given case as the second and third term of the WHERE clause
simply use "keys.table_id"),
consider adding and alias for sys.keys in the FROM clause am use that alias in the
WHERE clause instead of [sys.]keys .

Stefan

> > 
> > 
> > --
> > Gijs Molenaar
> > http://www.astro.uva.nl/people/gijs-molenaar/
> > 
> > _______________________________________________
> > developers-list mailing list
> > developers-list at monetdb.org
> > https://www.monetdb.org/mailman/listinfo/developers-list
> 
> _______________________________________________
> developers-list mailing list
> developers-list at monetdb.org
> https://www.monetdb.org/mailman/listinfo/developers-list
> 

-- 
| Stefan.Manegold at CWI.nl | DB Architectures   (DA) |
| www.CWI.nl/~manegold/  | Science Park 123 (L321) |
| +31 (0)20 592-4212     | 1098 XG Amsterdam  (NL) |




More information about the developers-list mailing list