You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2008/06/03 02:22:48 UTC

svn commit: r662609 - /apr/apr-util/trunk/dbd/apr_dbd_pgsql.c

Author: bojan
Date: Mon Jun  2 17:22:47 2008
New Revision: 662609

URL: http://svn.apache.org/viewvc?rev=662609&view=rev
Log:
Silence warnings and notices in PostgreSQL DBD driver.

Modified:
    apr/apr-util/trunk/dbd/apr_dbd_pgsql.c

Modified: apr/apr-util/trunk/dbd/apr_dbd_pgsql.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_pgsql.c?rev=662609&r1=662608&r2=662609&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_pgsql.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_pgsql.c Mon Jun  2 17:22:47 2008
@@ -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;