Database Connection Control Functions
There are database connection control functions for controlling the connections to database servers. An application can connect to multiple servers at a time. For example, a client connects to multiple databases. Each connection is represented by a PGconn object, which is obtained from the function PQconnectdb, PQconnectdbParams, or PQsetdbLogin. You can also obtain a connection object by using the PQconnectStart API together with the asynchronous PQconnectPoll polling method. Note that these functions will always return a non-null object pointer, unless memory allocation fails. The API for establishing a connection is stored in the PGconn object. The PQstatus function can be called to check the return value for a successful connection. The PGconn object stores the SSL context in a local thread. Therefore, the PGconn released thread must be the same as the allocated thread.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot