You are at the archive for the postgresql Category:

Making the Rails acts_as_tsearch plugin work with fixtures

acts-as-tsearch is pretty cool, except for the fact that it uses Ruby (app layer) instead of PL/pgSQL (DB layer) to update the tsvectors that are indexed for full text search. That means that fixture data gets inserted without being full text indexed. D’oh!
Here’s some code that changes that.

Making Rails’ rake:test not drop your PGSQL database

Let’s say you’re using Rails with PostgreSQL and the TSearch2 built-in full text search engine.
Did you notice that every time you run rake test, that depends on db:test:prepare, which depends on db:test:clone, which depends on db:test:purge, which drops the database and creates it again?
Along with your dropped database goes the TSearch2 functions that wrap the […]

Rails, Fixtures, the Test DB, and Test::Unit

From what I’ve seen, Rails’ weakest features lie in the way it prepares the test database and test data, and Ruby’s Test::Unit isn’t much better than the awful but ubuiquitous JUnit that Java developers are accustomed to. I set out this week to impose my preferences on Rails in this area, and that took some […]

Rails and the notion of Stupid Databases Being a Good Idea

For the last few days I’ve been struggling to bend Rails to my will regarding the proper way to assure data consistency. Today I made some progress. This builds upon some research I did a few months ago, and hopefully this is a more or less complete solution to the problem of making Rails work […]

Looking forward to LinuxWorld Expo SF 2007

Last year I was doing mobile development and there was interesting Linux-as-smartphone-OS stuff going on. Now I’m doing Ruby on Rails development and there’s interesting server grid stuff going on. Here’s what I’m looking forward to finding out more about (all of these are things I’ve been watching or directly researching already):