Re: libpq++

Started by Bruce Momjianover 24 years ago1 messagespatches
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Ofir Reichenberg wrote:

Hi,

inlined a patch to add the libpq setNoticeProcessor capability to libpq++.

Enjoy,
Ofir Reichenberg
Qlusters, Inc.

--------------------------------------------------------------------------------------

diff -u -r -b --new-file src/interfaces/libpq++/pgconnection.cc 
src/interfaces/libpq++/pgconnection.cc
--- src/interfaces/libpq++/pgconnection.cc	Wed Mar  6 14:52:29 2002
+++ src/interfaces/libpq++/pgconnection.cc	Wed Mar  6 14:52:19 2002
@@ -159,4 +159,8 @@
return (const char *)PQdb(pgConn); 
}
+PQnoticeProcessor PgConnection::SetNoticeProcessor(PQnoticeProcessor proc, 
void *arg)
+{
+return PQsetNoticeProcessor(pgConn, proc, arg);
+}
diff -u -r -b --new-file old/pgconnection.h new/pgconnection.h
--- src/interfaces/libpq++/pgconnection.h	Wed Mar  6 14:52:29 2002
+++ src/interfaces/libpq++/pgconnection.h	Wed Mar  6 14:52:19 2002
@@ -80,6 +80,9 @@
int ExecTuplesOk(const char* query);     // send a command and check if 
tuples are returned
PGnotify* Notifies();
+	// set the notice processor
+	PQnoticeProcessor SetNoticeProcessor(PQnoticeProcessor proc, void *arg);
+
protected:
ConnStatusType Connect(const char* conninfo);
void CloseConnection();
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026