ODBC v Libpq: C library for PostgreSQL
问题 I am going to be using a C library to connect and use a PostgreSQL database, I was wondering what are the pros and cons to ODBC and Libpq. From what I can tell, libpq seems to be faster but I was not able to get any clear answers or benchmarks. Also, is there any other library that might be better then ODBC/Libpq. 回答1: ODBC is useful if you want a standard adapter that speaks a similar API for different databases. I personally think it's an awful API, but it's widely understood and well