language: go

go:
  - 1.0.2
  - 1.0.3
  - 1.1
  - tip

script:
 - env PGUSER=postgres go test -v ./...

before_script:
 - psql -c 'create database pqgotest;' -U postgres

language: go

go:
  - 1.0.2
  - 1.0.3
  - 1.1
  - tip

before_install:
  - psql --version
  - sudo /etc/init.d/postgresql stop
  - sudo apt-get -y --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
  - sudo rm -rf /var/lib/postgresql
  - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
  - sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
  - sudo apt-get update -qq
  - sudo apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::="--force-confnew" install postgresql-$PGVERSION postgresql-server-dev-$PGVERSION
  - sudo chmod 777 /etc/postgresql/$PGVERSION/main/pg_hba.conf
  - sudo echo "local   all         postgres                          trust" > /etc/postgresql/$PGVERSION/main/pg_hba.conf
  - sudo echo "local   all         all                               trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
  - sudo echo "host    all         all         127.0.0.1/32          trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
  - sudo echo "host    all         all         ::1/128               trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
  - sudo /etc/init.d/postgresql restart

env:
  matrix:
    - PGVERSION=9.3
    - PGVERSION=9.2
    - PGVERSION=9.1
    - PGVERSION=9.0

script:
 - env PGUSER=postgres go test -v ./...

before_script:
 - psql -c 'create database pqgotest;' -U postgres

Add Travis support for Postgres 9.0, 9.1, 9.2, and 9.3
Add Travis support for Postgres 9.0, 9.1, 9.2, and 9.3

Previously we just used the default available Postgres;
this ensures pq works correctly on all supported versions.
