From: "J. D." Date: 2004-12-11T22:17:24+09:00 Subject: [CONFIRMED BUG] ActiveRecord 1.1.0 and PostgreSQL Sam Stephenson wrote: > Hi J. D., > > On Sat, 11 Dec 2004 11:27:24 +0900, J. D. wrote: > >>Looks like ActiveRecord assumes that all primary keys have a sequence >>table in postgresql. >> >>Am I forgetting to do something or is this a major bug in ActiveRecord? >> > > > It's not a bug, it's a constraint that Active Record puts on your > schema so that it can guess the proper sequence name. For rationale, > see http://www.rubyonrails.org/show/DatabaseCompatibility. > > Sam > > I finally tracked down a bug report and a patch already in CVS. I tried the patch shown in ticket 230 and it fixed the problem. http://dev.rubyonrails.org/trac.cgi/ticket/230 http://dev.rubyonrails.org/trac.cgi/ticket/117 Now I have to fix the loss of my credibility for recommending ActiveRecord 1.1.0 as being production-ready. Ah well, it's a good reminder to run our *own* tests even if the product comes with self-tests (like ruby 1.8.2 snapshots). I'm glad ActiveRecord didn't put a contraint on the schema forcing us to use *only* numeric, auto-incrementing primary keys. Many of us have existing schemas with at least one text primary key--and don't have the luxury of modifying them.