Obtaining a Driver Package, a Dependent Library, and Header Files
Obtain a dependent library and header files of libpq from GaussDB-Kernel_Database version number_OS version number_64bit_Libpq.tar.gz or GaussDB-Kernel_Database version number_OS version number_64bit_Libpq_Static.tar.gz in the driver package. The required header file is stored in the include folder, and the lib folder contains the required libpq library file. Programs that use libpq must include the header file libpq-fe.h and must connect to the libpq library.

In addition to libpq-fe.h, the include folder contains the header files postgres_ext.h, gs_thread.h, and gs_threadlocal.h by default. These three header files are the dependency files of libpq-fe.h.

The functions of the Libpq_Static driver package are the same as those of the libpq driver package. You can select a proper libpq.so library based on the actual application scenario. Differences are as follows:
- The libpq.so file in the libpq driver package dynamically links the OpenSSL libraries (libssl.so and libcrypto.so).
- The libpq.so file in the Libpq_Static driver package is statically linked to the OpenSSL libraries to resolve the conflict caused by inconsistency between the OpenSSL version provided by the OS and that provided by the OS in some customer scenarios.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.