Skip site navigation (1) Skip section navigation (2)

Re: Array passing

From: John Lister <john(dot)lister-ps(at)kickstone(dot)com>
To:
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Array passing
Date: 2009-04-07 21:03:09
Message-ID: 49DBBF8D.2080806@kickstone.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Looking at the spec/docs although you can specify the return type in the 
protocol there is no way to do it.. The only way i can see is to use a 
stored procedure and specifying the return type there using 
registerOutParameter(). However looking in the code 
(SimpleParameterList) although the parameter is set to OUT, the return 
type is ignored...

Is there any reason for this?

Would setting the return type like this cause any problems?

This would seem to solve my problem...

Thanks

Dave Cramer wrote:
>
>
> On Tue, Apr 7, 2009 at 10:24 AM, John Lister 
> <john(dot)lister-ps(at)kickstone(dot)com <mailto:john(dot)lister-ps(at)kickstone(dot)com>> 
> wrote:
>
>     Hi, i've been playing with arrays using the 604 version JDBC 4
>     driver and i have a question. They seem to be converted to strings
>     which are passed back and forth to the server.
>      
>     Is it possible to configure the driver to pass the arrays in
>     native form? The overhead of converting to strings is quite big in
>     my case (both in the size of the string and the time taken) so
>     would like to eliminate it if possible...
>      
>     Which leads onto, does the postgresql protocol support native
>     arrays? i'm trying to find docs about the datatypes but would hope
>     it did...
>
>  
> Yes, it does, but there are platform specific binary representations 
> of native types. For instance you can have floating point or integer 
> datetimes.
>
> There was some work done on supporting binary protocol at one point, 
> not sure where it stands now.
>
> Dave

In response to

Responses

pgsql-jdbc by date

Next:From: Brad MilneDate: 2009-04-07 21:34:20
Subject: Re: BLOB help - yes I've read around!
Previous:From: Guillaume CottenceauDate: 2009-04-07 15:37:30
Subject: Re: JAVA-POSTGRESQL connection broken

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group