Quoting Bojan Smojver <[EMAIL PROTECTED]>:

Here is a set of (hopefully better) patches against various files in apr_dbd code that enable the get_name support.

Arrrgh! Don't you hate it when you send the wrong thing? Here is correct PgSQL patch - no need to check for boundaries - PQfname already does that.

--
Bojan
diff -rauN apr-util-vanilla/dbd/apr_dbd_pgsql.c apr-util/dbd/apr_dbd_pgsql.c
--- apr-util-vanilla/dbd/apr_dbd_pgsql.c	2005-11-29 10:31:28.000000000 +1100
+++ apr-util/dbd/apr_dbd_pgsql.c	2006-02-14 15:41:27.000000000 +1100
@@ -116,6 +116,12 @@
     return 0;
 }
 
+static const char *dbd_pgsql_get_name(apr_pool_t *pool,
+                                      const apr_dbd_results_t *res, int n)
+{
+    return (res->res ? PQfname(res->res, n) : NULL);
+}
+
 static int dbd_pgsql_get_row(apr_pool_t *pool, apr_dbd_results_t *res,
                              apr_dbd_row_t **rowp, int rownum)
 {
@@ -640,5 +649,6 @@
     dbd_pgsql_pvselect,
     dbd_pgsql_pquery,
     dbd_pgsql_pselect,
+    dbd_pgsql_get_name
 };
 #endif

Reply via email to