DerelictPQ is only a binding to libpq. The only difference is theDerelictPQ.load method. Just follow the libpq documentation.http://www.postgresql.org/docs/9.1/static/libpq.htmlActually, Derelict binds to version 9.3, so the proper link should behttp://www.postgresql.org/docs/9.3/static/libpq.html
But could you look at my example and say what I am doing wrong? For my regret I do not know C and I have some problems with understanding this doc.