Add the primary_keys and primary_key_sequences instance variables, so we can get the correct return values for inserted rows.
# File lib/sequel/adapters/jdbc/postgresql.rb, line 17 def self.extended(db) db.instance_eval do @primary_keys = {} @primary_key_sequences = {} end end