fix for pg seq detection.
Marcus Ramberg [Thu, 16 Mar 2006 10:38:25 +0000 (10:38 +0000)]
Changes
lib/DBIx/Class/Storage/DBI/Pg.pm

diff --git a/Changes b/Changes
index 4bd6912..f3edc1f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,6 +5,7 @@ Revision history for DBIx::Class
         - columns_info_for made more robust / informative
         - ithreads compat added, fork compat improved
         - weaken result_source in all resultsets
+       - Make pg seq extractor less sensitive.
 
 0.05999_03 2006-03-14 01:58:10
         - has_many prefetch fixes
index f9cbee9..75b22e4 100644 (file)
@@ -23,7 +23,7 @@ sub get_autoinc_seq {
   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)\)/)
+      /^nextval\(+'([^']+)'::(?:text|regclass)\)/)
     {
       return $1; # may need to strip quotes -- see if this works
     }