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

From Lukas Eder
Subject Re: Fwd: [JDBC] Weird issues when reading UDT from stored function
Date
Msg-id AANLkTi=BTA8LeAP8-2Ms8mV3C=cAV2neruNx8dydUXu5@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: [JDBC] Weird issues when reading UDT from stored function  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-hackers
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! :-)

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Coding style guide
Next
From: Robert Haas
Date:
Subject: Re: Coding style guide