Search code examples
postgresqllibpq

Why are there 2 libpq folders in PostgreSQL


In the PostgreSQL source code there are 2 libpq folders :

  • src/interfaces/libpq
  • src/backend/libpq

What is the difference between them?

As from what I have seen only the one present in interfaces folder is compiled and referred.


Solution

  • One's for backend (for the server to receive connections -- src/backend/libpq) and one's for frontend (for clients to make connections to the server -- src/interfaces/libpq)

    Disclosure: I work for EnterpriseDB (EDB)