From 3e1cb3e9672c8083d373b21589de0a362b3831b0 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Mon, 21 Nov 2011 10:06:34 +0100 Subject: pgsql-sdbc: document-by-comment --- connectivity/source/drivers/postgresql/pq_connection.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index 9b2210af8199..5b7c8ecfb21b 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -444,6 +444,9 @@ public: values.push_back(s); acquired.push_back(true); } + // This const_cast is there for compatibility with PostgreSQL <= 9.1; + // PostgreSQL >= 9.2 has the right const qualifiers in the headers + // for a return type of "char const*const*". char const** c_array() const { return const_cast (&values[0]); } }; @@ -497,7 +500,7 @@ static void properties2arrays( const Sequence< PropertyValue > & args, if( append ) { OUString value; - tc->convertTo( args[i].Value ,getCppuType( &value) ) >>= value; + tc->convertTo( args[i].Value, getCppuType( &value) ) >>= value; char *v = strdup(rtl::OUStringToOString(value, enc).getStr()); values.push_back ( v ); } -- cgit