News for hackers. Stuff that matters.
Re:PostgreSQL 9.3 Beta 1 Released by btown on Monday May 13, 2013 @11:03AM (#5699039)
Where would one find out if anyone is working on a patch for ActiveRecord?
Re:PostgreSQL 9.3 Beta 1 Released by masklinn on Monday May 13, 2013 @11:11AM (#5699087)
The Rails/ActiveRecord bug tracker?

edit: the underlying connector might be a better idea to start with, as it'll need to expose the fields somehow before an ORM can take advantage of them.

Re:PostgreSQL 9.3 Beta 1 Released by joevandyk on Monday May 13, 2013 @01:50PM (#5700182)
Looks like work has started on the underlying connector: https://bitbucket.org/ged/ruby-pg/issue/161/add-support-for-...
Re:PostgreSQL 9.3 Beta 1 Released by masklinn on Monday May 13, 2013 @02:20PM (#5700428)
I wouldn't say "work has started" when the bug has just been reported.
Re:PostgreSQL 9.3 Beta 1 Released by netghost on Monday May 13, 2013 @11:51AM (#5699358)
This is where you'd want to be looking in the source: https://github.com/rails/rails/tree/master/activerecord/lib/...

Specifically at any error handling, which I think would likely be here:

https://github.com/rails/rails/blob/master/activerecord/lib/...

Re:PostgreSQL 9.3 Beta 1 Released by judofyr on Monday May 13, 2013 @11:40AM (#5699274)
Re:PostgreSQL 9.3 Beta 1 Released by jeltz on Monday May 13, 2013 @11:41AM (#5699278)
I think it can use either pg (wrapper around libpq) or postgres-pr (pure ruby), though I always use pg.

EDIT: Seems like they have dropped support for postgres.

EDIT2: Yes, I did mean postgres-pr.

Re:PostgreSQL 9.3 Beta 1 Released by masklinn on Monday May 13, 2013 @11:42AM (#5699296)
Do you mean postgres-pr? (postgres is marked as a deprecated gem to replace with pg)
Re:PostgreSQL 9.3 Beta 1 Released by moonlight80 on Tuesday May 14, 2013 @04:53AM (#5703670)
I think ActiveRecord pattern is more limiting you than helpful. I found the following post quite interesting: http://mindref.blogspot.com/2013/02/sql-vs-orm.html
Re:PostgreSQL 9.3 Beta 1 Released by effn on Monday May 13, 2013 @12:37PM (#5699653)
ActiveRecord doesn't even support constraints in the first place.
Re:PostgreSQL 9.3 Beta 1 Released by pjungwir on Monday May 13, 2013 @12:55PM (#5699787)
Shameless plug: here is a gem I wrote to manage foreign keys and CHECK constraints (and also indexes) in a Rails project:

https://github.com/pjungwir/db_leftovers

Re:PostgreSQL 9.3 Beta 1 Released by joevandyk on Monday May 13, 2013 @01:46PM (#5700152)
What do you mean by "support constraints"?

If I, for example, violate a unique index, a ActiveRecord::RecordNotUnique exception is raised.

Re:PostgreSQL 9.3 Beta 1 Released by mjhoy on Monday May 13, 2013 @03:47PM (#5700977)
Is that true? I might be wrong about this, but I think ActiveRecord checks for uniqueness (and other constraints) in application code, generating an extra database query if needed. If you _actually_ violate the unique index, a PGError is raised (if using postgres).
Re:PostgreSQL 9.3 Beta 1 Released by FooBarWidget on Monday May 13, 2013 @04:24PM (#5701158)
No. ActiveRecord checks for constraints on top of what the database offers. You are free to specify database constraints if you like. In older versions of ActiveRecord, uniqueness errors generate a generic database exception. In recent versions, uniqueness errors generate the specific exception RecordNotUnique.