Skip to content

Instantly share code, notes, and snippets.

@nmenda
Created September 14, 2009 14:53
Show Gist options
  • Save nmenda/186698 to your computer and use it in GitHub Desktop.
Save nmenda/186698 to your computer and use it in GitHub Desktop.
my $dbh = CXGN::DB::InsertDBH->new( { dbhost=>$dbhost,
dbname=>$dbname,
dbschema => 'public',
} );
}
my $schema= Bio::Chado::Schema->connect( sub { $dbh->get_actual_dbh() }, );
my $o=$schema->resultset('Organism::Organism')->new({});
$o->species('test species');
$o->genus('test genus');
$o->insert();
---
error message:
DBIx::Class::Row::insert(): DBI Exception: DBD::Pg::db last_insert_id failed: ERROR: currval of sequence "organism_organism_id_seq" is not yet defined in this session [for Statement "SELECT currval(?)"] at test.pl line 39
--
if I use :
$dbh= CXGN::DB::Connection->new();
the error message is:
DBIx::Class::Row::insert(): DBI Exception: DBD::Pg::db last_insert_id failed: ERROR: permission denied for sequence organism_organism_id_seq [for Statement "SELECT currval(?)"] at test.pl line 39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment