summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq++/pgdatabase.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-04-22 22:39:15 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-04-22 22:39:15 +0000
commit290978fff07d1b9570272cd9d3bf9d21359576d1 (patch)
tree8b6abf8d9a87b88aff6984924b700765f7539ca1 /src/interfaces/libpq++/pgdatabase.h
parent51c92941c668028f60d8ff1eb86489af4dbba391 (diff)
downloadpostgresql-290978fff07d1b9570272cd9d3bf9d21359576d1.tar.gz
Remove broken tracing code (which would be dangerous if it did work...)
libpq++.h contained copies of the class declarations in the other libpq++ include files, which was bogus enough, but the declarations were not completely in step with the real declarations. Remove these in favor of including the headers with #include. Make PgConnection destructor virtual (not absolutely necessary, but seems like a real good idea considering the number of subclasses derived from it). Give all classes declared private copy constructors and assignment operators, to prevent compiler from thinking it can copy these objects safely.
Diffstat (limited to 'src/interfaces/libpq++/pgdatabase.h')
-rw-r--r--src/interfaces/libpq++/pgdatabase.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/interfaces/libpq++/pgdatabase.h b/src/interfaces/libpq++/pgdatabase.h
index e0fd9f9268..37e019a880 100644
--- a/src/interfaces/libpq++/pgdatabase.h
+++ b/src/interfaces/libpq++/pgdatabase.h
@@ -14,7 +14,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $Id: pgdatabase.h,v 1.7 2000/03/30 05:30:42 tgl Exp $
+ * $Id: pgdatabase.h,v 1.8 2000/04/22 22:39:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,8 +22,9 @@
#ifndef PGDATABASE_H
#define PGDATABASE_H
+#ifndef PGCONNECTION_H
#include "pgconnection.h"
-
+#endif
// ****************************************************************
//
@@ -35,8 +36,10 @@
// results are being received.
class PgDatabase : public PgConnection {
public:
- PgDatabase(const char* conninfo) : PgConnection(conninfo) {} // use reasonable defaults
- ~PgDatabase() {} ; // close connection and clean up
+ // connect to the database with conninfo
+ PgDatabase(const char* conninfo) : PgConnection(conninfo) {}
+
+ ~PgDatabase() {} // close connection and clean up
// query result access
int Tuples();
@@ -67,6 +70,12 @@ public:
protected:
PgDatabase() : PgConnection() {} // Do not connect
+
+private:
+// We don't support copying of PgDatabase objects,
+// so make copy constructor and assignment op private.
+ PgDatabase(const PgDatabase&);
+ PgDatabase& operator= (const PgDatabase&);
};
#endif // PGDATABASE_H