SQL Reserved Words

Ryan Fife ryan.fife at fifeventures.co.uk
Tue Aug 22 11:07:00 CEST 2006


Hello,

I'm working on getting RoundCube to work with Oracle and have run  
into problems with SQL reserved words being used for both table and  
column names.  Oracle is one of the most strict databases with regard  
to reserved words.  Here is the list of tables and column names that  
I've found to cause problems:

Tables:
session (I changed it to sessions and updated my config file. Easy fix.)

Reserved Field names:
users.language
messages.uid (Not SQL-standard reserved but Oracle reserved)
messages.from
messages.to
messages.date
messages.size

There's also a problem in the identities table with a minus sign in  
one of the fields:
identities.reply-to

There is no mechanism to have table and column names mapped in the  
config file so I'm asking for a recommendation on how to proceed.  I  
think the ideal solution would be to change all the columns from  
reserved words to allowed words since only UID is a special Oracle  
(and Postgres) reserved word and the rest shouldn't really be allowed  
anywhere.  The other alternative is to quote them everywhere but I'm  
not sure how portable this is and I'm testing Oracle on it now.  What  
does everyone suggest?

I've also attached my first attempt at oracle.initial.sql.

Cheers,

Ryan




More information about the Dev mailing list