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

Commit51c9294

Browse files
committed
Update example: PgLargeObject constructor now takes a conninfo string,
not a bare database name.
1 parent6caa4fa commit51c9294

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/interfaces/libpq++/examples/testlo.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/examples/Attic/testlo.cc,v 1.5 1999/12/03 18:28:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/examples/Attic/testlo.cc,v 1.6 2000/04/22 22:15:48 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -19,22 +19,22 @@ int main(int argc, char **argv)
1919
{
2020
// Check if the program was invoked correctly; if not, signal error
2121
if (argc <4 || argc >5) {
22-
cerr <<"Usage:" << argv[0] <<"database_name in_filename out_filename [oid]" << endl;
22+
cerr <<"Usage:" << argv[0] <<"conninfo_str in_filename out_filename [oid]" << endl;
2323
exit(1);
2424
}
2525

2626
// Get the arguments passed to the program
27-
char*database = argv[1];
27+
char*conninfo = argv[1];
2828
char* in_filename = argv[2];
2929
char* out_filename = argv[3];
3030

3131
// Set up the connection and create a large object
3232
int lobjId = ( argc ==4 ?0 :atoi(argv[4]) );
33-
PgLargeObjectobject(lobjId,database);
33+
PgLargeObjectobject(lobjId,conninfo);
3434

3535
// check to see that the backend connection was successfully made
3636
if ( object.ConnectionBad() ) {
37-
cerr <<"Connectionto database '" <<database <<"' failed." << endl
37+
cerr <<"Connectionwith conninfo '" <<conninfo <<"' failed." << endl
3838
<< object.ErrorMessage();
3939
exit(1);
4040
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp