Improve glue with libpq.