Re: [HACKERS] Fwd: Weird issues when reading UDT from stored function - Mailing list pgsql-jdbc

From rsmogura
Subject Re: [HACKERS] Fwd: Weird issues when reading UDT from stored function
Date
Msg-id f7d118eadd72401c99d71ab7d470149a@mail.softperience.eu
Whole thread Raw
In response to Re: [HACKERS] Fwd: Weird issues when reading UDT from stored function  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: [HACKERS] Fwd: Weird issues when reading UDT from stored function  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
 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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: [HACKERS] Fwd: Weird issues when reading UDT from stored function
Next
From: Oliver Jowett
Date:
Subject: Re: [HACKERS] Fwd: Weird issues when reading UDT from stored function