Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7aa443d

Browse files
committed
Change libpgeasy to take dbname at end like all other interfaces.
1 parent796695c commit7aa443d

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

‎src/interfaces/libpgeasy/examples/pginsert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ main(int argc, char **argv)
2727
if (argc!=2)
2828
halt("Usage: %s database\n",argv[0]);
2929

30-
connectdb(argv[1],NULL,NULL,NULL,NULL);
30+
connectdb(NULL,NULL,NULL,NULL,argv[1]);
3131

3232
on_error_continue();
3333
doquery("DROP TABLE testfetch");

‎src/interfaces/libpgeasy/examples/pgnulltest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ main(int argc, char **argv)
3838
if (argc!=2)
3939
halt("Usage: %s database\n",argv[0]);
4040

41-
connectdb(argv[1],NULL,NULL,NULL,NULL);
41+
connectdb(NULL,NULL,NULL,NULL,argv[1]);
4242

4343
on_error_continue();
4444
doquery("DROP TABLE testfetch");

‎src/interfaces/libpgeasy/examples/pgwordcount.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ main(int argc, char **argv)
1919
if (argc!=2)
2020
halt("Usage: %s database\n",argv[0]);
2121

22-
connectdb(argv[1],NULL,NULL,NULL,NULL);
22+
connectdb(NULL,NULL,NULL,NULL,argv[1]);
2323
on_error_continue();
2424
doquery("DROP TABLE words");
2525
on_error_stop();

‎src/interfaces/libpgeasy/libpgeasy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ static inttuple;
4242
**
4343
*/
4444
PGconn*
45-
connectdb(char*dbName,
46-
char*pghost,
45+
connectdb(char*pghost,
4746
char*pgport,
4847
char*pgoptions,
49-
char*pgtty)
48+
char*pgtty,
49+
char*dbName)
5050
{
5151
/* make a connection to the database */
5252
conn=PQsetdb(pghost,pgport,pgoptions,pgtty,dbName);

‎src/interfaces/libpgeasy/libpgeasy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
*/
55

66
PGresult*doquery(char*query);
7-
PGconn*connectdb(char*dbName,
8-
char*pghost,
7+
PGconn*connectdb(char*pghost,
98
char*pgport,
109
char*pgoptions,
11-
char*pgtty);
10+
char*pgtty,
11+
char*dbName);
1212
voiddisconnectdb(void);
1313
intfetch(void*param,...);
1414
intfetchwithnulls(void*param,...);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp