After installing the BioSQL schema, Bio::SQL::establish_connection(CONNECTION_INFO_HERE) throws an ActiveRecord::StatementInvalid error when it tries to create the first ontology in bio/io/biosql/biosql.rb:31:in establish_connection:
Bio::SQL::Ontology Load (0.8ms) SELECT "ontology".* FROM "ontology" WHERE (name = 'Annotation Tags') LIMIT 1
(0.2ms) BEGIN
SQL (0.8ms) INSERT INTO "ontology" ("definition", "name") VALUES ($1, $2) RETURNING "ontology_id" [["definition", nil], ["name", "Annotation Tags"]]
(0.1ms) ROLLBACK
raises:
PGError: ERROR: cannot perform INSERT RETURNING on relation "ontology"
HINT: You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause.
: INSERT INTO "ontology" ("definition", "name") VALUES ($1, $2) RETURNING "ontology_id"
ActiveRecord::StatementInvalid: PGError: ERROR: cannot perform INSERT RETURNING on relation "ontology"
HINT: You need an unconditional ON INSERT DO INSTEAD rule with a RETURNING clause.
Relevant Gems installed:
- activerecord (3.1.1)
- composite_primary_keys (4.1.1)
- pg (0.11.0)
- bio (HEAD)
Using:
- psql (PostgreSQL) 9.1.1
- BioSQL schema version 1.0.1 and
- ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
I need to update or check the library before digging into this.