Created
September 14, 2009 14:53
-
-
Save nmenda/186698 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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