PQconnectStart
Description
Establishes a non-blocking connection with the database server.
Prototype
PGconn* PQconnectStart(const char* conninfo);
Parameter
Keyword |
Description |
---|---|
conninfo |
String of connection information. This parameter can be left empty. In this case, the default value is used. It can contain one or more values separated by spaces or contain a URL. |
Return Values
- When the non-blocking mode (PQconnectStart+PQconnectPoll) is used to connect to the database and the connection information contains multiple IP addresses, libpq attempts to connect to each IP address in sequence and checks target_session_attrs until the connection is successful.
- When the database is connected in non-blocking mode, the timeout detection needs to be processed by the upper-layer application.
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