reverting r1413 and r1414 in favor of passing a scalar ref to parser which the produc...
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer.pm
index 9f4d3d0..3366dc1 100644 (file)
@@ -34,9 +34,7 @@ sub produce { "" }
 ## They are special per Producer, and provide support for the old 'now()'
 ## default value exceptions
 sub _apply_default_value {
-  my (undef, $field_ref, $default, $exceptions, $noquote) = @_;
-
-  my @noquote = (defined $noquote)?@$noquote:();
+  my (undef, $field_ref, $default, $exceptions) = @_;
 
   if ($exceptions and ! ref $default) {
     for (my $i = 0; $i < @$exceptions; $i += 2) {
@@ -51,11 +49,10 @@ sub _apply_default_value {
     }
   }
 
-  my $qc = (grep m/^$default$/, @noquote)?"":"'"; 
   if (ref $default) {
       $$field_ref .= " DEFAULT $$default";
   } else {
-      $$field_ref .= " DEFAULT $qc$default$qc";
+      $$field_ref .= " DEFAULT '$default'";
   }
 
 }