I am not sure if I am doing something wrong or there is a bug in the code but I am getting a strange issue. When I try to run the following code I get a crash when attempting to accessing the values using PQgetvalue.
This isn't really a comment on the documentation. Please ask for help on the pgsql-general mailing list, Stack Overflow, or suitable forums.
You should provide a backtrace of the crash from a debugger when you do so.