apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r662610 - /apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c
Date Tue, 03 Jun 2008 00:24:18 GMT
Author: bojan
Date: Mon Jun  2 17:24:18 2008
New Revision: 662610

URL: http://svn.apache.org/viewvc?rev=662610&view=rev
Log:
Backport r662609 from the trunk.
Silence warnings and notices in PostgreSQL DBD driver.

Modified:
    apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c

Modified: apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c?rev=662610&r1=662609&r2=662610&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c (original)
+++ apr/apr-util/branches/1.3.x/dbd/apr_dbd_pgsql.c Mon Jun  2 17:24:18 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;



Mime
View raw message