Try this Travis thing

Not a huge fan of having to commit a configuration file for this, but
pragmatism wins today.

Signed-off-by: Daniel Farina <daniel@fdr.io>
Travis-CI: Try to set up PostgreSQL test database properly

Signed-off-by: Daniel Farina <daniel@fdr.io>
Ignore data rows for Exec queries

The wording in the interface docs ("executes a query without returning
any rows") suggests that rows are ignored, not that the query must not
return any rows. This change supports ignoring data rows.
Contributor: Maciek Sakrejda

Signed-off-by: Daniel Farina <daniel@fdr.io>
Also fix case where parameters are passed in
Also ignore RowDescription for Exec-with-params
Ignore-SELECT-results tests for both Exec code paths
Add package comment.

Add package comment, fix typo in error message, update link to
godoc.org.
Add contributor Gary Burd

Signed-off-by: Daniel Farina <daniel@fdr.io>
Call user.Current() only when "user" is not set.

Editorialized somewhat by Daniel Farina.

Fixes issue 69
Add contributor Ewan Chou

Signed-off-by: Daniel Farina <daniel@fdr.io>
Fix Travis CI config
Don't die on trailing whitespace in a connection string

Currently, if you give pq a connection string with a trailing
whitespace, pq likes to die with the confusing message pq: invalid
option: ""

This patch just trims whitespace around the connection string so that
when parseOptions splits on " ", it doesn't get a spurious empty
option.

Editorialized by Daniel Farina <daniel@fdr.io>
Add contributor: Bill Mill
Add more accurate copyright clause

Many people have contributed anad I've made effort to track every one
in README, and their copyrights apply to this work.  So, I don't think
ths change does anything but reflect reality.
Handle user-name-defaulting better on more platforms

The principal consideration was the slow and inconsistent (relative to
PostgreSQL.org's libpq) way that the operating system user name was
accessed on Windows.

The mechanism introduces build tags to 'pq': instead of using
user.Current() to fetch the default user name on Windows, use the
morally equivalent Win32 API call used in libpq.

Editorialized by Daniel Farina <daniel@fdr.io>
Add Chris Walsh as a contributor
Some minor cleanup

- It's not necessary to take an address when calling a method
- v, _ := m[k] is equivalent to v := m[k] when m is a map
- k, _ := range ... is equivalent to k := range ...
- Use for...range in a few places
Use driver.RowsAffected type
Use IndexByte to find string terminator

No performance gain since bytes.Index special cases this anyway, but it means
stringTerm can go away.