Postgres 9.2 changed some column names so our code can take different paths depending.

Configure travis to install postgres versions we know will behave differently.
Help keep things DRY by moving these checks into the functions that do the actual work.