1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-03 09:13:20 +03:00

Fix WARN->NOTICE in docs. Change libpgeasy connection parameters to use

PQconnectdb() style connections.
This commit is contained in:
Bruce Momjian
2000-05-18 14:24:38 +00:00
parent ba26aeebc1
commit f63ba5cd6a
18 changed files with 43 additions and 111 deletions

View File

@@ -44,16 +44,12 @@ static int tuple;
**
*/
PGconn *
connectdb(char *pghost,
char *pgport,
char *pgoptions,
char *pgtty,
char *dbName)
connectdb(char *options)
{
/* make a connection to the database */
conn = PQsetdb(pghost, pgport, pgoptions, pgtty, dbName);
conn = PQconnectdb(options);
if (PQstatus(conn) == CONNECTION_BAD)
halt("Connection to database '%s' failed.\n%s\n", dbName,
halt("Connection to database using '%s' failed.\n%s\n", options,
PQerrorMessage(conn));
return conn;
}