Commit 80bbfe76 authored by Bruce Momjian's avatar Bruce Momjian

Inlined a patch to add the libpq setNoticeProcessor capability to

libpq++.

Ofir Reichenberg
parent 9f9e3c98
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.12 2001/09/30 22:30:37 tgl Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgconnection.cc,v 1.13 2002/03/11 15:08:18 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -159,4 +159,8 @@ const char* PgConnection::DBName() const ...@@ -159,4 +159,8 @@ const char* PgConnection::DBName() const
return (const char *)PQdb(pgConn); return (const char *)PQdb(pgConn);
} }
PQnoticeProcessor PgConnection::SetNoticeProcessor(PQnoticeProcessor proc, void *arg)
{
return PQsetNoticeProcessor(pgConn, proc, arg);
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pgconnection.h,v 1.15 2002/01/22 19:02:40 tgl Exp $ * $Id: pgconnection.h,v 1.16 2002/03/11 15:08:18 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -80,6 +80,9 @@ public: ...@@ -80,6 +80,9 @@ public:
int ExecTuplesOk(const char* query); // send a command and check if tuples are returned int ExecTuplesOk(const char* query); // send a command and check if tuples are returned
PGnotify* Notifies(); PGnotify* Notifies();
// set the notice processor
PQnoticeProcessor SetNoticeProcessor(PQnoticeProcessor proc, void *arg);
protected: protected:
ConnStatusType Connect(const char* conninfo); ConnStatusType Connect(const char* conninfo);
void CloseConnection(); void CloseConnection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment