Database Reference
In-Depth Information
•
sslmode
•
disable
•
allow
•
verify-ca
•
verify-full
•
requiressl
•
sslcert
•
sslkey
•
sslrootcert
•
sslcrl
•
requirepeer
•
krbsrvname
•
gsslib
•
service
The details of these values can be found at
http://www.postgresql.org/
docs/9.4/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS
.
If you see the following kind of error, then it is due to an error in the
conninfo
string:
missing "=" after "port" in connection info string
Using PQconnectdbParams
The
PQconnectdbParams
function is a variant of the
PQconnectdb
function. Like
PQconnectdb
, this function takes a two-dimension array of keys and values instead
of a single key-value pair string. This function only differs in the function argument
to
PQconnectdb
. The syntax for
PQconnectdbParams
is as follows:
PGconn *PQconnectdbParams(const char **keywords,
const char **values,
int expand_dbname);