pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Lukas Eder <lukas.eder@gmail.com>
Cc: rsmogura <rsmogura@softperience.eu>
Cc: pgsql-jdbc@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: Fwd: [JDBC] Weird issues when reading UDT from stored function
Date: Thu, 17 Feb 2011 01:03:38 +1300
Message-ID: <4D5BBD1A.7010005@opencloud.com> (raw)
In-Reply-To: <AANLkTikHdYF407NgX=giNEizY8Z2tcN47xkxuLBO73J=@mail.gmail.com>
References: <c63c0e3d-cd3b-4b82-b891-50f8ef43bfdb@j25g2000vbs.googlegroups.com>
	<AANLkTi=HC-C5gL29ovNqcqtfNQa6XM8oNA0a86YsYcVt@mail.gmail.com>
	<AANLkTi=pTFGV+vVFgKwB6+ZNWb+r9LrYpJXKEytL5P02@mail.gmail.com>
	<201101111946.33083.rsmogura@softperience.eu>
	<AANLkTi=UH_9qC8CmQBN7aEwsdUMYAzjRUCJmDiWFTQQH@mail.gmail.com>
	<4d7cc4033a655539995c240a6f282ab5@mail.softperience.eu>
	<AANLkTi=EAbWpOZhXUaG0OG7smtExwoE4M9dv2ykzPVcZ@mail.gmail.com>
	<4D33CD00.6000408@opencloud.com>
	<AANLkTin_UwaAjVKOqY3ZGpHtEt4WiX8f-ERJhA16JWX+@mail.gmail.com>
	<AANLkTimvqQmkvG0QcruFGGxCrQ63U8srtDtMZBH8WjQU@mail.gmail.com>
	<AANLkTi=Nf_eqY0Ao1W41rMc4vp-B6+8j+AENJ2x-qJ--@mail.gmail.com>
	<AANLkTikWLBniH-QRKa0AL+O71+DnTyizn770Hd89d5Lu@mail.gmail.com>
	<AANLkTi=0KS71rnnLjFrQ4G8VaOXsbYqndbmLStwL9aRt@mail.gmail.com>
	<AANLkTikNjPoca5n7CusTEL2GoXNQuZeeF0vyegpsz3UF@mail.gmail.com>
	<AANLkTikHdYF407NgX=giNEizY8Z2tcN47xkxuLBO73J=@mail.gmail.com>

On 17/02/11 00:58, Robert Haas wrote:
> On Wed, Feb 16, 2011 at 3:30 AM, Lukas Eder <lukas.eder@gmail.com> wrote:
>> I'm not trying to fix the signature. I want exactly that signature. I want
>> to return 1 UDT as an OUT parameter from a function.
>>
>> Somewhere between JDBC and the database, this signature is lost, and JDBC's
>> internal code tells me that I have to bind 6 OUT parameters, instead of 1.
>> It happens to be so, because the UDT contains 6 attributes, so somehow the
>> JDBC/database protocol flattens the UDT, and I think that's a bug, either in
>> JDBC or in the protocol or in the database. My findings were that I can
>> correctly read the UDT OUT parameter using the pgAdmin III tool, so I
>> excluded the database as a bug holder candidate.
> 
> Oh, OK.  Sorry, I can't help you any with the JDBC side...

Well, the underlying problem is that "SELECT * from
function_with_one_out_parameter()" is returning *6* columns, not 1
column. I don't know if that's expected or not on the plpgsql side, but
the JDBC driver has no way of distinguishing that sort of result from a
function that has 6 OUT parameters.

Oliver



view thread (48+ messages)  latest in thread

Message-ID: <4D5BBD1A.7010005@opencloud.com>
Permalink:  ../4D5BBD1A.7010005@opencloud.com/
Also on:    postgresql.org/message-id/4D5BBD1A.7010005@opencloud.com

 · 

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: oliver@opencloud.com, robertmhaas@gmail.com, lukas.eder@gmail.com, rsmogura@softperience.eu, pgsql-hackers@postgresql.org
  Subject: Re: Fwd: [JDBC] Weird issues when reading UDT from stored function
  In-Reply-To: <4D5BBD1A.7010005@opencloud.com>
  References: <c63c0e3d-cd3b-4b82-b891-50f8ef43bfdb@j25g2000vbs.googlegroups.com> <AANLkTi=HC-C5gL29ovNqcqtfNQa6XM8oNA0a86YsYcVt@mail.gmail.com> <AANLkTi=pTFGV+vVFgKwB6+ZNWb+r9LrYpJXKEytL5P02@mail.gmail.com> <201101111946.33083.rsmogura@softperience.eu> <AANLkTi=UH_9qC8CmQBN7aEwsdUMYAzjRUCJmDiWFTQQH@mail.gmail.com> <4d7cc4033a655539995c240a6f282ab5@mail.softperience.eu> <AANLkTi=EAbWpOZhXUaG0OG7smtExwoE4M9dv2ykzPVcZ@mail.gmail.com> <4D33CD00.6000408@opencloud.com> <AANLkTin_UwaAjVKOqY3ZGpHtEt4WiX8f-ERJhA16JWX+@mail.gmail.com> <AANLkTimvqQmkvG0QcruFGGxCrQ63U8srtDtMZBH8WjQU@mail.gmail.com> <AANLkTi=Nf_eqY0Ao1W41rMc4vp-B6+8j+AENJ2x-qJ--@mail.gmail.com> <AANLkTikWLBniH-QRKa0AL+O71+DnTyizn770Hd89d5Lu@mail.gmail.com> <AANLkTi=0KS71rnnLjFrQ4G8VaOXsbYqndbmLStwL9aRt@mail.gmail.com> <AANLkTikNjPoca5n7CusTEL2GoXNQuZeeF0vyegpsz3UF@mail.gmail.com> <AANLkTikHdYF407NgX=giNEizY8Z2tcN47xkxuLBO73J=@mail.gmail.com> <4D5BBD1A.7010005@opencloud.com>

* 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