Pass $options through directly instead of $generator
Dagfinn Ilmari Mannsåker [Wed, 9 Sep 2015 15:09:26 +0000 (16:09 +0100)]
lib/SQL/Translator/Producer/PostgreSQL.pm

index 66461f0..7685587 100644 (file)
@@ -451,9 +451,7 @@ sub create_view {
         #
         if (is_geometry($field)) {
             foreach ( create_geometry_constraints($field, $options) ) {
-                my ($cdefs, $fks) = create_constraint($_, {
-                    generator => $generator,
-                });
+                my ($cdefs, $fks) = create_constraint($_, $options);
                 push @$constraint_defs, @$cdefs;
                 push @$fks, @$fks;
             }
@@ -924,9 +922,7 @@ sub rename_table {
 sub alter_create_index {
     my ($index, $options) = @_;
     my $generator = _generator($options);
-    my ($idef, $constraints) = create_index($index, {
-        generator => $generator,
-    });
+    my ($idef, $constraints) = create_index($index, $options);
     return $index->type eq NORMAL ? $idef
         : sprintf('ALTER TABLE %s ADD %s',
               $generator->quote($index->table->name),