diff options
author | Marc G. Fournier <scrappy@hub.org> | 2002-08-22 00:15:14 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 2002-08-22 00:15:14 +0000 |
commit | da4683fbe1cba48cf5b5b29055b66e0bacb00162 (patch) | |
tree | 87834b1b18614313e895dcc8c504f58af9f6b4b2 /src/interfaces/libpq++/examples/testlibpq0.cc | |
parent | b663f3443ba096a06970214c3e83e79f6e570b84 (diff) |
Okay, libpq++ is moved to GBorg, and all traces of it have been removed
from the core repository ... I haven't *moved* the libpq++ files out of the
tree, mainly as we want to keep them in place for past branches ...
Peter, I think I've covered all the files I need, and re-ran autoconf to make
sure the configure file is in place properly ...
Diffstat (limited to 'src/interfaces/libpq++/examples/testlibpq0.cc')
-rw-r--r-- | src/interfaces/libpq++/examples/testlibpq0.cc | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/interfaces/libpq++/examples/testlibpq0.cc b/src/interfaces/libpq++/examples/testlibpq0.cc deleted file mode 100644 index 24fb03fc785..00000000000 --- a/src/interfaces/libpq++/examples/testlibpq0.cc +++ /dev/null @@ -1,53 +0,0 @@ -/*------------------------------------------------------------------------- -* -* testlibpq0.c-- -* small test program for libpq++, -* small interactive loop where queries can be entered interactively -* and sent to the backend -* -* Copyright (c) 1994, Regents of the University of California -* -* -* IDENTIFICATION -* $Header: /cvsroot/pgsql/src/interfaces/libpq++/examples/Attic/testlibpq0.cc,v 1.7 2002/07/02 16:32:19 momjian Exp $ -* -*------------------------------------------------------------------------- -*/ - -#include <iostream.h> -#include "libpq++.h" - -int main() -{ - // Open the connection to the database and make sure it's OK - PgDatabase data("dbname=template1"); - if ( data.ConnectionBad() ) - { - cout << "Connection was unsuccessful..." << endl - << "Error message returned: " << data.ErrorMessage() << endl; - return 1; - } - else - cout << "Connection successful... Enter queries below:" << endl; - - // Interactively obtain and execute queries - ExecStatusType status; - string buf; - int done = 0; - while (!done) - { - cout << "> "; - cout.flush(); - getline(cin, buf); - if ( buf != "" ) - if ( (status = data.Exec( buf.c_str() )) == PGRES_TUPLES_OK ) - data.DisplayTuples(); - else - cout << "No tuples returned..." << endl - << "status = " << status << endl - << "Error returned: " << data.ErrorMessage() << endl; - else - done = 1; - } - return 0; -} // End main() |