PQconnectdb
Function
PQconnectdb is used to establish a new connection with the database server.
Prototype
PGconn *PQconnectdb(const char *conninfo);
Parameter
Keyword |
Parameter Description |
---|---|
conninfo |
Connection string. For details about the fields in the string, see Connection Strings. |
Return Value
PGconn * points to the object pointer that contains a connection. The memory is applied for by the function internally.
Precautions
- This function establishes a new database connection using the parameters taken from the string conninfo.
- The input parameter can be empty, indicating that all default parameters can be used. It can also contain one or more parameters separated by spaces or it can contain a URL.
Example
For details, see Example.
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