How to convert a PGresult to custom data type with libpq (PostgreSQL)
Posted
by mocopera
on Stack Overflow
See other posts from Stack Overflow
or by mocopera
Published on 2010-05-06T09:22:33Z
Indexed on
2010/05/06
9:28 UTC
Read the original article
Hit count: 201
Hi everyone!
I'm using the libpq library in C to accessing my PostgreSQL database. So, when I do res = PQexec(conn, "SELECT point FROM test_point3d"); I don't know how to convert the PGresult I got to my custom data type.
I know I can use the PQgetValue function, but again I don't know how to convert the returning string to my custom data type.
Any suggestion?
Thanks in advice.
© Stack Overflow or respective owner