Re: Fwd: [JDBC] Weird issues when reading UDT from stored function

From: Lukas Eder <lukas(dot)eder(at)gmail(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: rsmogura <rsmogura(at)softperience(dot)eu>, Florian Pflug <fgp(at)phlo(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fwd: [JDBC] Weird issues when reading UDT from stored function
Date: 2011-02-17 17:31:04
Message-ID: AANLkTi=BTA8LeAP8-2Ms8mV3C=cAV2neruNx8dydUXu5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

Hi Oliver

There are two problems.
>
> The first problem is a plpgsql problem in that particular function. It's
> broken regardless of how you call it. Here's how to fix it [...]
>

Thanks for insisting! I missed that fact. In the end, it looked like the
same error, but you're right about the plpgsql syntax error.

> The second problem is that the JDBC driver always generates calls in the
> "SELECT * FROM ..." form, but this does not work correctly for
> one-OUT-parameter-that-is-a-UDT, as seen in the example immediately
> above. Here's how to do the call for that particular case [...]
>

Knowing these things, I think I can live with the status quo in my case. As
I'm writing a database abstraction library (http://jooq.sourceforge.net),
with generated source code, I can hide these Postgres-specific details from
end-user code easily and assemble the UDT myself when reading the 6 return
values.

> Any questions? (I'm sure there will be questions. Sigh.)
>

Thanks again for the patience! :-)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Kerr 2011-02-17 17:32:04 Re: default_tablespace
Previous Message Andrew Dunstan 2011-02-17 17:28:51 Re: Re: [COMMITTERS] pgsql: Fix blatantly uninitialized variable in recent commit.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Radosław Smogura 2011-02-19 10:47:24 Re: PGXAConnection and autocommit problem
Previous Message Maurin, Marion 2011-02-17 13:02:28 Re: PGXAConnection and autocommit problem