PQconnectdbParams
Function
PQconnectdbParams is used to establish a new connection with the database server.
Prototype
PGconn *PQconnectdbParams(const char * const *keywords,
const char * const *values,
int expand_dbname);
Parameter
Table 1 PQconnectdbParams parameters
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 two NULL-terminated arrays. Unlike PQsetdbLogin, the parameter set can be extended without changing the function signature. Therefore, use of this function (or its non-blocking analogs PQconnectStartParams and PQconnectPoll) is preferred for new application programming.
Example
For details, see Example.
Feedback