Change libpgeasy to take dbname at end like all other interfaces.

This commit is contained in:
Bruce Momjian 2000-04-28 14:58:51 +00:00
parent 796695c9d1
commit 7aa443d01e
5 changed files with 9 additions and 9 deletions

View File

@ -27,7 +27,7 @@ main(int argc, char **argv)
if (argc != 2)
halt("Usage: %s database\n", argv[0]);
connectdb(argv[1], NULL, NULL, NULL, NULL);
connectdb(NULL, NULL, NULL, NULL, argv[1]);
on_error_continue();
doquery("DROP TABLE testfetch");

View File

@ -38,7 +38,7 @@ main(int argc, char **argv)
if (argc != 2)
halt("Usage: %s database\n", argv[0]);
connectdb(argv[1], NULL, NULL, NULL, NULL);
connectdb(NULL, NULL, NULL, NULL, argv[1]);
on_error_continue();
doquery("DROP TABLE testfetch");

View File

@ -19,7 +19,7 @@ main(int argc, char **argv)
if (argc != 2)
halt("Usage: %s database\n", argv[0]);
connectdb(argv[1], NULL, NULL, NULL, NULL);
connectdb(NULL, NULL, NULL, NULL, argv[1]);
on_error_continue();
doquery("DROP TABLE words");
on_error_stop();

View File

@ -42,11 +42,11 @@ static int tuple;
**
*/
PGconn *
connectdb(char *dbName,
char *pghost,
connectdb(char *pghost,
char *pgport,
char *pgoptions,
char *pgtty)
char *pgtty,
char *dbName)
{
/* make a connection to the database */
conn = PQsetdb(pghost, pgport, pgoptions, pgtty, dbName);

View File

@ -4,11 +4,11 @@
*/
PGresult *doquery(char *query);
PGconn *connectdb(char *dbName,
char *pghost,
PGconn *connectdb(char *pghost,
char *pgport,
char *pgoptions,
char *pgtty);
char *pgtty,
char *dbName);
void disconnectdb(void);
int fetch(void *param,...);
int fetchwithnulls(void *param,...);