Actually it hasn't been fixed, there was an attempt with:
http://dev.rubyonrails.org/ticket/9253
But it ran into a problem with databases that needed primary key
prefetch and the ticket is currently waiting for some ideas on
how to approach the issue.
I think I could get the patch to work by just keeping the PK prefetch
and going with the insert_record(table_name, attributes) but I'm not
even sure anymore if that would be a good approach.
Perhaps the easiest fix would be to just let the adapters implement
insert_blank_statement() (so they could each provide their way of inserting
a blank row) and generate the SQL in AR::Base.create() in case there
are no columns to insert.
> Hi there,
>
> Inserting empty records has been handled, in a different way, in edge
> rails, this will work in 2.0.
Actually it hasn't been fixed, there was an attempt with:
http://dev.rubyonrails.org/ticket/9253
But it ran into a problem with databases that needed primary key
prefetch and the ticket is currently waiting for some ideas on
how to approach the issue.
Oh right, never mail the list when jetlagged :).
Perhaps the easiest fix would be to just let the adapters implement
insert_blank_statement() (so they could each provide their way of inserting
a blank row) and generate the SQL in AR::Base.create() in case there
are no columns to insert.
Dear Tarmo,
I am new to the list; but I am starting to wonder how many core
rails developers are using Postgres versus other databases? What is
the status of support/quality of the various database drivers compared
to MySQL, which seems to be the dominant server?
I am new to the list; but I am starting to wonder how many core
rails developers are using Postgres versus other databases? What is
the status of support/quality of the various database drivers compared
to MySQL, which seems to be the dominant server?
I'm not sure that anyone on the core team is currently using
PostgreSQL in their projects. However the tests still get run by the
CI system, and there are several active users who tend to submit
patches when something's broken.
Dear Koz,
Thanks for your reply; perhaps I will looking into submiting a test
that shows the bug that Tarmo is describing on his very informative
writeup at http://dev.rubyonrails.org/ticket/9253.