Sunday, February 19, 2012

Re: [Rails] Updating the PostgreSQL Admin Cookbook

On Sat, Feb 18, 2012 at 6:21 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
I'm planning a new edition of the PostgreSQL Admin Cookbook
http://www.2ndQuadrant.com/en/books/

The 1st Edition covered PostgreSQL without regard to the client
environment, meaning it didn't have much in there about Ruby on Rails.
Obviously, that's a shame and I'd like to improve things next time
around.

If we have 5-10 pages aimed directly at Ruby on Rails users, what
topics/hints/tips do you think I should cover? What confused you the
first time? What aspects aren't as obvious as they should be? What
still annoys you?!? Would it be worth having a "Rails edition" of the
book? Other ideas?

I see a few elements that are somewhat postgresql - Rails specific
and may be relevant ?? Not sure how relevant, just my 2c.

* explain the difference between connecting via
  tcp/ip (`host: localhost` in the database.yml or via
  socket) : it changes the authentication mechanism
  (ref local => ident vs. host => md5). Maybe you
  already explain the pg_hba.conf and you refer to
  it from a Rails config/database.yml section.

* the usage of "port: 5433" (on Ubuntu, when
  2 postgresql versions are installes in parallel (e.g.
  8.3 and 8.4 on 10.04), they use ports 5432 and port
  5433 but you need to know that and set the port to
  5433 for the database.yml. 

* using schema's in postgresql seems non-trivial
  to match with Rails (I have not used schema's recently,
  so I am not aware of recent solutions).

* Default Rails migrations do not generate foreign
  key constraints. Explain when that would make
  sense (not necessarily always) and if so, what
  are proper ways to implement them (there exist
  gems to do it properly).

* similar on indices and uniq indices. You could
  explain when they do make sense (certrainly
  not always) and if so, what are proper ways to
  implement them in Rails. And how to properly
  catch a uniqueness validation exception thrown
  by the database in the Rails uniqueness
  validator.

* you might discuss Sequel and DataMapper
  as alternatives ?

HTH,

Peter


--
*** Available for a new project ***

Peter Vandenabeele
http://twitter.com/peter_vhttp://coderwall.com/peter_v

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate