aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-04-28 14:58:51 +0000
committerBruce Momjian <bruce@momjian.us>2000-04-28 14:58:51 +0000
commit7aa443d01e3daede2e8926865eebe14fe9a61997 (patch)
treef4cb032eda6ba834864b835103ee691b13c8cb00
parent796695c9d1ef51ac0ae56f3105c0a45f9417f52b (diff)
downloadpostgresql-7aa443d01e3daede2e8926865eebe14fe9a61997.tar.gz
postgresql-7aa443d01e3daede2e8926865eebe14fe9a61997.zip
Change libpgeasy to take dbname at end like all other interfaces.
-rw-r--r--src/interfaces/libpgeasy/examples/pginsert.c2
-rw-r--r--src/interfaces/libpgeasy/examples/pgnulltest.c2
-rw-r--r--src/interfaces/libpgeasy/examples/pgwordcount.c2
-rw-r--r--src/interfaces/libpgeasy/libpgeasy.c6
-rw-r--r--src/interfaces/libpgeasy/libpgeasy.h6
5 files changed, 9 insertions, 9 deletions
diff --git a/src/interfaces/libpgeasy/examples/pginsert.c b/src/interfaces/libpgeasy/examples/pginsert.c
index 5fa96bf474d..18b5382ede7 100644
--- a/src/interfaces/libpgeasy/examples/pginsert.c
+++ b/src/interfaces/libpgeasy/examples/pginsert.c
@@ -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");
diff --git a/src/interfaces/libpgeasy/examples/pgnulltest.c b/src/interfaces/libpgeasy/examples/pgnulltest.c
index f54a3f5916c..da88efbbe48 100644
--- a/src/interfaces/libpgeasy/examples/pgnulltest.c
+++ b/src/interfaces/libpgeasy/examples/pgnulltest.c
@@ -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");
diff --git a/src/interfaces/libpgeasy/examples/pgwordcount.c b/src/interfaces/libpgeasy/examples/pgwordcount.c
index c5705e87fad..08138510ea8 100644
--- a/src/interfaces/libpgeasy/examples/pgwordcount.c
+++ b/src/interfaces/libpgeasy/examples/pgwordcount.c
@@ -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();
diff --git a/src/interfaces/libpgeasy/libpgeasy.c b/src/interfaces/libpgeasy/libpgeasy.c
index c2efe034c4a..41d3d0429ca 100644
--- a/src/interfaces/libpgeasy/libpgeasy.c
+++ b/src/interfaces/libpgeasy/libpgeasy.c
@@ -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);
diff --git a/src/interfaces/libpgeasy/libpgeasy.h b/src/interfaces/libpgeasy/libpgeasy.h
index e58d5a1cd60..3686b4e9263 100644
--- a/src/interfaces/libpgeasy/libpgeasy.h
+++ b/src/interfaces/libpgeasy/libpgeasy.h
@@ -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,...);