pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rsmogura <rsmogura@softperience.eu>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Florian Pflug <fgp@phlo.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Lukas Eder <lukas.eder@gmail.com>
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 12:52:36 +0100
Message-ID: <f7d118eadd72401c99d71ab7d470149a@mail.softperience.eu> (raw)
In-Reply-To: <4D5D0A07.80706@opencloud.com>
References: <c63c0e3d-cd3b-4b82-b891-50f8ef43bfdb@j25g2000vbs.googlegroups.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>
	<AANLkTimg0nEjma8MgFT-ZPrcQ7EHGZ4m2FZBhF5e+Hdt@mail.gmail.com>
	<4D5BC65D.8070507@opencloud.com>
	<A7BF4EA6-9385-! 47B3-B9BC-34649BBD4F6F@phlo.org>
	<24907.1297869823@sss.pgh.pa.us>
	<4D5C6876.7060805@opencloud.com>
	<AC9A9506-36C4-415A-9C1D-40CBB80C450A@phlo.org>
	<4D5CF52B.9020707@opencloud.com>
	<befa3498579f3abcc3d1e2e2b8579700@mail.softperience.eu>
	<4D5D012E.8030707@opencloud.com>
	<90b9defedf07d3c3732025d140897b57@mail.softperience.eu>
	<4D5D0A07.80706@opencloud.com>

 On Fri, 18 Feb 2011 00:44:07 +1300, Oliver Jowett wrote:
> On 18/02/11 00:37, rsmogura wrote:
>> On Fri, 18 Feb 2011 00:06:22 +1300, Oliver Jowett wrote:
>>> On 17/02/11 23:18, rsmogura wrote:
>>>> Yes, but driver checks number of declared out parameters and 
>>>> number of
>>>> resulted parameters (even check types of those), to prevent 
>>>> programming
>>>> errors.
>>>
>>> And..?
>>>
>>> Oliver
>>
>> And it will throw exception when result will income. If you will 
>> remove
>> this then you will lose check against programming errors, when 
>> number of
>> expected parameters is different that number of actual parameters. 
>> Bear
>> in mind that you will get result set of 6 columns, but only 1 is
>> expected. I think you can't determine what should be returned and 
>> how to
>> fix result without signature.
>
> You've completely missed the point. I am not suggesting we change 
> those
> checks at all. I am suggesting we change how the JDBC driver 
> translates
> call escapes to queries so that for N OUT parameters, we always get
> exactly N result columns, without depending on the datatypes of the
> parameters in any way.
>
> Oliver

 May You provide example select for this, and check behaviour with below 
 procedure, too.

 CREATE OR REPLACE FUNCTION p_enhance_address3(OUT address 
 u_address_type, OUT i1 integer)
   RETURNS record AS
 $BODY$
 BEGIN
         SELECT t_author.address
         INTO address
         FROM t_author
         WHERE first_name = 'George';
 i1 = 12;
 END;
 $BODY$
   LANGUAGE plpgsql



view thread (48+ messages)  latest in thread

Message-ID: <f7d118eadd72401c99d71ab7d470149a@mail.softperience.eu>
Permalink:  ../f7d118eadd72401c99d71ab7d470149a@mail.softperience.eu/
Also on:    postgresql.org/message-id/f7d118eadd72401c99d71ab7d470149a@mail.softperience.eu

 · 

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: rsmogura@softperience.eu, oliver@opencloud.com, fgp@phlo.org, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, lukas.eder@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: Fwd: [JDBC] Weird issues when reading UDT from stored function
  In-Reply-To: <f7d118eadd72401c99d71ab7d470149a@mail.softperience.eu>
  References: <c63c0e3d-cd3b-4b82-b891-50f8ef43bfdb@j25g2000vbs.googlegroups.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> <AANLkTimg0nEjma8MgFT-ZPrcQ7EHGZ4m2FZBhF5e+Hdt@mail.gmail.com> <4D5BC65D.8070507@opencloud.com> <24907.1297869823@sss.pgh.pa.us> <4D5C6876.7060805@opencloud.com> <AC9A9506-36C4-415A-9C1D-40CBB80C450A@phlo.org> <4D5CF52B.9020707@opencloud.com> <befa3498579f3abcc3d1e2e2b8579700@mail.softperience.eu> <4D5D012E.8030707@opencloud.com> <90b9defedf07d3c3732025d140897b57@mail.softperience.eu> <4D5D0A07.80706@opencloud.com> <f7d118eadd72401c99d71ab7d470149a@mail.softperience.eu>

* 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