Hi,
I just discovered, that there is missing a const when passing a buffer to PQescapeBytea and PQunescapeBytea. I fixed it and tried to create a usable diff (I'm not so familar to diff).
Tommi