|Subject:||DB2 Producer creates incorrect CHECK constraints|
|X-Mailer:||MIME-tools 5.427 (Entity 5.427)|
SQL-Translator-0.11006 # perl -v This is perl, v5.8.8 built for i386-linux-thread-multi # uname -a Linux L3X6996.ibm.com 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:58:38 EDT 2010 i686 i686 i386 GNU/Linux The SQL::Translator::Producer::DB2.pm generates CONSTRAINTS incorrectly. 1) For users wishing to create a CHECK constraint, it expects to see the type set to the string 'CHECK_C'. However, ::Producer::Constants defines CHECK_C to be the string 'CHECK', so CHECK constraints cannot be made validly. 2) With this fixed, there is still a problem with CONSTRAINT production. IBM developerWorks shows the syntax diagrams:However, the DB2.pm producer will generate CONSTRAINTs that do not comply with these diagrams, in particular CHECK constraints. I am more than willing to write this fix, I will need a little guidance on the checking in process, but the fix bit, I'm more than capable of completing.