Add overdue credits for those assisting in recent maintenance

Signed-off-by: Daniel Farina <daniel@heroku.com>
Add clear-text authentication.
Credit Martin Olsen

Signed-off-by: Daniel Farina <daniel@heroku.com>
Confirm that Postgres does not allow bad cstrings for param values

Looks like it is checked in postgres.c:exec_bind_message if the format
of parameters is textual...which seems like all of them right now.

It also looks like for binary mode that Postgres may protect against
this, by ensuring that a type receive function eats the entire
parameter value buffer.  A poorly written Postgres recv (binary
decoding) function could open the user to nul byte injections, but I'm
not sure if there's much to be done about that.

Signed-off-by: Daniel Farina <daniel@heroku.com>
Add parameter type sensitivity to type encoding

This requires recording the response to parsing to know what types are
expected for parameters, and then passing that information to the type
encoder.

Signed-off-by: Daniel Farina <daniel@heroku.com>
Credit Kamil Kisiel

Signed-off-by: Daniel Farina <daniel@heroku.com>
Support timestamp without tz

This just lets Go's time package do what it is going to by default
when one is left without offset information.  Hope it's a behavior
people want.

The main change here is pushing down the column type into the parsing
function, as Go's time parsing can't deal with data that only has the
fractional-hour timezone offset when such a fraction exists
(e.g. "-07" for "-07:00", but "-7:30" necessarily retaining its
precision).  This old hack could not be applied unconditionally (it is
wrong when the timestamp has no time zone offset suffix), so this
information lets a correct decision be made.

Clearly, this approach also can't handle the Postgres datestyle
parameter, but that's a fight to pick some other time.

Signed-off-by: Daniel Farina <daniel@fdr.io>
Revert "Support timestamp without tz"

Seems to work on some older or younger go devel, but not on a release
version, it seems.

This reverts commit 7f1933fdbdec31350abc6a616463eb85653fee31.
Support timestamp without tz, redux

This time, some more effort has been paid to testing on an older Go
version, 1.0.2, and carefully preserving the old hacks to make time
parsing work with those older versions with a less useful time.Parse.
It has also been tested on Go 1.0.3.

This just lets the Go time package use its default behavior when one
is left without time offset information.  Hope it is a behavior people
want.

The main change here is pushing down the column type into the parsing
function, as Go's time parsing can't deal with data that only has the
fractional-hour timezone offset when such a fraction exists
(e.g. "-07" for "-07:00", but "-7:30" necessarily retaining its
precision).  This old hack could not be applied unconditionally (it is
wrong when the timestamp has no time zone offset suffix), so this
information lets a correct decision be made.

Clearly, this approach also can't handle the Postgres datestyle
parameter, but that's a fight to pick some other time.

As a target of opportunity, move the 'oid' type to 'types.go', since
for now all oids I know of handled by the program are type oids.  This
causes 'go fmt' to go a little nuts and rewrite the long but boring
file.

Signed-off-by: Daniel Farina <daniel@fdr.io>
moved to github.com/lib/pq
Add test case for transaction rollback.  Currently fails with a nasty error.
Handle 'C' command complete message
Editorialize comments

Right now there is no obvious way to push command tags through
database/sql, so just drop it on the floor.  libpq does little more
than report it and transition the state machine to 'READY', and as of
now Go pq has no state machine model to speak of.

Signed-off-by: Daniel Farina <daniel@fdr.io>
Regenerate OID table and make it public

Also document how the table is generated.  This has been generated
from a build of PostgreSQL 9.2.3.

Previously, Oids above 10000 were included, but these are not
guaranteed to remain stable between releases and don't seem very
useful besides, so they are now omitted.

Signed-off-by: Daniel Farina <daniel@fdr.io>
Fix some bugs in the tests reported by 'go vet'

Both format string confusion.

Signed-off-by: Daniel Farina <daniel@fdr.io>
Break out Oids into a new subpackage

To clean up docs, and also because some people wanted to re-use them
separately.

Signed-off-by: Daniel Farina <daniel@fdr.io>
Add contributors

Signed-off-by: Daniel Farina <daniel@fdr.io>
Fix another reference to the old repository

Signed-off-by: Daniel Farina <daniel@fdr.io>
Fixed imports of github.com/lib/pq/oid