go-pg/pg — pull request #6 by Babazka (2014-05-29 12:03:36+00:00)
Title: Support encoding values of pointers, including nil -> NULL

At the moment `pg` cannot encode pointer values, so the following example panic:
```
rec := &struct{
Id int
X *int // perhaps we desire to insert NULLs sometimes
}{1, new(int)}
*rec.X = 1138
db.Exec("INSERT INTO test (id, x) VALUES (?id, ?x)", rec)
```
This pull request fixes this problem.