You can clone with
HTTPS or Subversion.
Might be nice to have an option for ActiveRecord inserts and updates to use RETURNING * instead of RETURNING <primary key>.
RETURNING <primary key>
Below is a small test case that shows why.
# change to some test database already setup on your system
ActiveRecord::Base.logger = Logger.new(STDERR)
drop table if exists t;
create table t (
id serial primary key,
tomorrow timestamptz default now() + interval '1 day'
class T < ActiveRecord::Base
self.table_name = 't'
t = T.create!
# t.tomorrow is nil :(
# SQL was: INSERT INTO "t" DEFAULT VALUES RETURNING "id"
p t.reload # it's there on reload though.
joevandyk@4497703 is a failing rails test case for this.
If postgresql modifies a column with a trigger, activerecord won't know about the changes until the model object is reloaded.
I'd love a way to be able to toggle this on and off on a case-by-case basis (there's going to be a performance regression if this is turned on all the time).
Please keep discussion and feature requests in the Rails Core mailing list.