added experimental ObjectCache.pm (load before Core), no tests yet and not included...
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / PK / Auto / Pg.pm
index 3452cae..52185e5 100644 (file)
@@ -16,6 +16,12 @@ sub last_insert_id {
 
 sub get_autoinc_seq {
   my $self=shift;
+  
+  # return the user-defined sequence if known
+  if ($self->sequence) {
+    return $self->{_autoinc_seq} = $self->sequence;
+  }
+  
   my $dbh= $self->storage->dbh;
     my $sth    = $dbh->column_info( undef, undef, $self->_table_name, '%');
     while (my $foo = $sth->fetchrow_arrayref){
@@ -30,17 +36,17 @@ sub get_autoinc_seq {
 
 =head1 NAME 
 
-DBIx::Class::PK::Auto::SQLite - Automatic Primary Key class for SQLite
+DBIx::Class::PK::Auto::Pg - Automatic Primary Key class for Postgresql
 
 =head1 SYNOPSIS
 
 =head1 DESCRIPTION
 
-This class implements autoincrements for SQLite.
+This class implements autoincrements for Postgresql.
 
 =head1 AUTHORS
 
-Matt S. Trout <perl-stuff@trout.me.uk>
+Marcus Ramberg <m.ramberg@cpan.org>
 
 =head1 LICENSE