Patch: Force Primitives

From: Nicholas White <n(dot)j(dot)white(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Patch: Force Primitives
Date: 2013-03-24 04:10:48
Message-ID: CA+=vxNbFOFq_24NASd6abQhY8AAwWfOYLQB7mAGMXNkOSzYJQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I'd like the JDBC driver's Array implementations to return primitive arrays
when I call getArray(). I can force this behaviour by passing
&compatible=8.2 in my JDBCUrl, but then I can't transfer the arrays from
the database via the binary protocol, as that requires a minimum compatible
version of 8.3. I've attached a patch that makes the driver recognise a
forcePrimitives boolean flag in the JDBCUrl, and if it sees this it will
return primitive arrays, not object arrays.

Is this OK? Thanks -

Nick

Attachment Content-Type Size
force-primitives.patch application/octet-stream 6.0 KB

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nicholas White 2013-03-25 15:51:08 Re: Patch: Force Primitives
Previous Message Chen Huajun 2013-03-20 07:32:54 [PATCH] fix a misstake in Driver.getPropertyInfo()