← Home

Some resources on using PostgreSQL with Ruby On Rails

2014-08-10

hstore_accessor gem. It provides discrete fields to directly access values in hstore columns to ActiveRecord.

A blog post on using an hstore column for storing hashes with arbitrary keys. His approach is different from the one used in hstore_accessor gem. Aly explains how to store hashes that may have different keys for each record, while hstore_accessor gem implies that hashed in all the records have the same keys.

Next, a very practical article on using Postgres array columns in Rails 4 by Plataformatec. They explain how to use an array column for storing tags.

Finally, a post by Thoughtbot on why PostgreSQL may sometimes not use indexes in SELECT queries.