Hi developers,

I noticed that in MMBase 1.7 table aliases have more sensible names. But this adaptation is causing problems with the database setup we run. The next example shows this:

SQL -> SELECT maps.number,public.number,public.title FROM vpro4_maps maps,vpro4_insrel insrel,vpro4_public public WHERE maps.number IN (3769557) AND (maps.number=insrel.snumber AND public.number=insrel.dnumber)

The table vpro4_public gets an alias name 'public' which causes a syntax error while using the informix database. I understand if we escaped the reserved keyword 'public' with something like m_public we would not have had this problem.

In MMBase 1.6 this was not a problem because the tablename aliases had names like a,b,c,d, etc.
There are 2 thing we can do. We can change some table names, or we can add a prefix to the tablename alias in such a way that the tablename alias never gives a problem. Personally i would go for the second option, this makes it easier for people to migrate to MMBase 1.7 and this prevents syntax errors when people are using reserved keywords that are not mentioned in the reserved keywords list.


Rob





Reply via email to