On Fri, 2008-05-30 at 01:50 -0500, William A. Rowe, Jr. wrote:
> So if it's possible with the postgresql to mute the stdout information,
> we really need to do so.
I'm not convinced of the usefulness of this, but here is the patch
nevertheless.
--
Bojan
Index: dbd/apr_dbd_pgsql.c
===================================================================
--- dbd/apr_dbd_pgsql.c (revision 661581)
+++ dbd/apr_dbd_pgsql.c (working copy)
@@ -1191,6 +1191,16 @@
return trans->mode = (mode & TXN_MODE_BITS);
}
+static void null_notice_receiver(void *arg, const PGresult *res)
+{
+ /* nothing */
+}
+
+static void null_notice_processor(void *arg, const char *message)
+{
+ /* nothing */
+}
+
static apr_dbd_t *dbd_pgsql_open(apr_pool_t *pool, const char *params,
const char **error)
{
@@ -1210,6 +1220,9 @@
return NULL;
}
+ PQsetNoticeReceiver(conn, null_notice_receiver, NULL);
+ PQsetNoticeProcessor(conn, null_notice_processor, NULL);
+
sql = apr_pcalloc (pool, sizeof (*sql));
sql->conn = conn;