PQconnectdb
Description
Establishes a new connection with the database server.
Prototype
PGconn* PQconnectdb(const char* conninfo);
Parameters
Keyword |
Description |
---|---|
conninfo |
Connection string. For details about the columns in the string, see Connection Parameters. |
Return Values
PGconn * points to the object pointer that contains a connection. The memory is allocated by the function internally.
Precautions
- This function opens a new connection with the parameters specified by conninfo.
- The input parameter can be empty, indicating that all default parameters can be used. It can contain one or more values separated by spaces or contain a URL.
Examples
For details, see Typical Application Development Examples.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.