pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: John Lister <john.lister-ps@kickstone.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Array passing
Date: Tue, 7 Apr 2009 22:16:46 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0904072207470.17908@leary.csoft.net> (raw)
In-Reply-To: <49DBBF8D.2080806@kickstone.com>
References: <E20C873C7A4448C3AF0A68B421ADED62@squarepi.com>
	<491f66a50904070817o3af217d4odc32bdfd29b47789@mail.gmail.com>
	<49DBBF8D.2080806@kickstone.com>



On Tue, 7 Apr 2009, John Lister wrote:

> 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...
>

A parameter being in-vs-out is only relevent to function arguments being 
in or out, they have nothing to do with the format (text/binary) of the 
data, or even the direction data is traveling (from server/client).

> Would setting the return type like this cause any problems?
>

If you could rig this up to set a flag indicating it should be binary, 
that wouldn't magically make everyone else respect it and do all the 
necessary conversions.  You'd end up sending or receiving garbage data.

The place to start is really with the existing binary transfer patches:

http://archives.postgresql.org/pgsql-jdbc/2008-11/msg00000.php

I've only looked at the patches to receive data in binary form, but there 
are also patches to send data in binary as well.  Perhaps you can just 
apply them and all will be well, if not they're a good starting point and 
should at least demonstrate the scope of the problem (it's not just 
setting a flag).

Kris Jurka



view thread (13+ messages)  latest in thread

Message-ID: <Pine.BSO.4.64.0904072207470.17908@leary.csoft.net>
Permalink:  ../Pine.BSO.4.64.0904072207470.17908@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.64.0904072207470.17908@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, john.lister-ps@kickstone.com
  Subject: Re: Array passing
  In-Reply-To: <Pine.BSO.4.64.0904072207470.17908@leary.csoft.net>
  References: <E20C873C7A4448C3AF0A68B421ADED62@squarepi.com> <491f66a50904070817o3af217d4odc32bdfd29b47789@mail.gmail.com> <49DBBF8D.2080806@kickstone.com> <Pine.BSO.4.64.0904072207470.17908@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox