ged/ruby-pg — pull request #5 by ymmtmdk (2014-09-28 06:53:34+00:00)
Title: Replaced StringValuePtr to StringValueCStr

On ruby-head environment, I got the following error:

`PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8": 0xe0 0x0c 0xf7`

I researched the code and found it may occured by not terminated C string.
In Ruby’s README.ext,
```
You can also use the macro named StringValueCStr(). This is just
like StringValuePtr(), but always add nul character at the end of
the result. If the result contains nul character, this macro causes
the ArgumentError exception.
StringValuePtr() doesn't guarantee the existence of a nul at the end
of the result, and the result may contain nul.
```

So, I made this patch and solved the error.
Is this right?