evsql

Evsql is a C-language SQL library designed for use with libevent, and primarily PostgreSQL's libpq.

Why would you be writing a PostgreSQL application in C? But if you are, you can find the (MIT) source code at github.com/SpComb/evsql.