diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 82295f1f49..9c5b4c9c79 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -305,12 +305,12 @@ module ActiveRecord execute "DROP INDEX #{index_name}" end - + private BYTEA_COLUMN_TYPE_OID = 17 def last_insert_id(table, sequence_name) - Integer(@connection.exec("SELECT currval('#{sequence_name}')")[0][0]) + Integer(select_value("SELECT currval('#{sequence_name}')")) end def select(sql, name = nil) |