From: Marcus Ramberg Date: Thu, 16 Mar 2006 10:38:25 +0000 (+0000) Subject: fix for pg seq detection. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=32da104267aec90fe9105444ebe5f985dc488658;p=dbsrgits%2FDBIx-Class-Historic.git fix for pg seq detection. --- diff --git a/Changes b/Changes index 4bd6912..f3edc1f 100644 --- 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 diff --git a/lib/DBIx/Class/Storage/DBI/Pg.pm b/lib/DBIx/Class/Storage/DBI/Pg.pm index f9cbee9..75b22e4 100644 --- a/lib/DBIx/Class/Storage/DBI/Pg.pm +++ b/lib/DBIx/Class/Storage/DBI/Pg.pm @@ -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 }