October 2001
Beginner to intermediate
400 pages
7h 45m
English
The libpq++ library enables C++ applications to interface with the PostgreSQL back end. Fundamentally, it operates in the same way as the libpq library except that much of it is implemented as classes.
libpq++ provides two main classes: PgConnection and PgDatabase.
This class provides the functions needed to connect to a PostgreSQL database.
PgConnection::PgConnection(const char *conninfo)
The connection info can be specified either by the connect-string argument (as in the preceding) or by expressly setting the following environmental variables:
| PGDATABASE | Sets the database name. |
| PGDATESTYLE | Sets the default date style. |
| PGGEQO | Sets the default Genetic Optimizer. |
| PGHOST | Sets the database host. |
| PGOPTIONS | Sets various ... |
Read now
Unlock full access