mairbek/finagle-postgres — pull request #25 by jyeo (2013-07-26 00:53:12+00:00)
Title: Fix binding for NULL

Binding NULL currently fails. Assuming you have:

create table foo (bar text);

The following results in a server error:

query <- client.prepare("insert into foo values ($1)")
foo <- query.exec(null)

Probably something like "ERROR: invalid byte sequence for encoding "UTF8": 0xff"

It looks like the intent was to send a param to Bind that only had -1 (in StringValueEncoder) to indicate NULL, but it was never handled in Bind.asPacket() -- -1 length, no data following.