When creating a table script (CREATE TABLE), constraint names (like any other name, column or table name) have to be quoted (set between ") if they contain spaces, accented characters or a mixture of upper/lower case characters.
The Create Table Script of Squirrel (versions at least up to 2.6.8) create something like
ALTER TABLE XXX
ADD CONSTRAINT This Should Be Quoted
FOREIGN KEY (attrib1)
REFERENCES table1(attrib2) ON DELETE NO ACTION ON UPDATE NO ACTION;
instead of
ALTER TABLE XXX
ADD CONSTRAINT "This Should Be Quoted"
FOREIGN KEY (attrib1)
REFERENCES table1(attrib2) ON DELETE NO ACTION ON UPDATE NO ACTION;
The error does not depend on the version of Squirrel SQL (tested: 2.5 and 2.6.8) or the used database (tested: Oracle Thin Driver and PostgreSQL).
2008-11-13
holger@jakobs.com