converted tabs to spaces, removed trailing whitespace
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Pg.pm
index 7fb6b8c..1352c25 100644 (file)
@@ -22,17 +22,21 @@ sub get_autoinc_seq {
     : (undef,$source->name);
   while (my $col = shift @pri) {
     my $info = $dbh->column_info(undef,$schema,$table,$col)->fetchrow_arrayref;
-    if (defined $info->[12] and $info->[12] =~ 
-      /^nextval\('"?([^"']+)"?'::(?:text|regclass)\)/)
+    if (defined $info->[12] and $info->[12] =~
+      /^nextval\(+'([^']+)'::(?:text|regclass)\)/)
     {
-      return $1;
-    } 
+      return $1; # may need to strip quotes -- see if this works
+    }
   }
 }
 
+sub sqlt_type {
+  return 'PostgreSQL';
+}
+
 1;
 
-=head1 NAME 
+=head1 NAME
 
 DBIx::Class::Storage::DBI::Pg - Automatic primary key class for PostgreSQL