agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] Returning a complex type with potential null parameters
2+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] Returning a complex type with potential null parameters
@ 2006-04-20 21:47
0 siblings, 1 reply; 2+ messages in thread
From: @ 2006-04-20 21:47 UTC (permalink / raw)
Hello,
I'm trying to write a PL/Java function that can take null parameters and
returns a complex type. However I'm having trouble doing this. My method
looks like:
public static boolean getProductPricing(Integer productId,
Integer priceLevelId,
String locationCode,
ResultSet receiver) throws
SQLException {
receiver.updateDouble(1, 0d);
receiver.updateDouble(2, 1d);
receiver.updateString(3, "Hello World");
return true;
}
And my postgresql declaration looks like:
CREATE OR REPLACE FUNCTION ds_get_product_pricing(int4, int4, varchar)
RETURNS ds_product_pricing
AS 'postgresql.Products.getProductPricing(java.lang.Integer,
java.lang.Integer,
java.lang.String,
java.sql.ResultSet)' LANGUAGE
java;
However when I try to execute a query I get the error:
ERROR: No java type mapping installed for "java.sql.ResultSet"
If I change my java signature to use primitive types, and I remove the
"alternative" explicit mapping in the postgresql declaration, it works fine,
but then I cannot pass null values in.
Is it possible to return a complex type with non-primitive argument types
with PL/Java?
--
Caleb Land
(RedHatDude at gmail.com)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060420/68662866/attachment.html;
^ permalink raw reply [nested|flat] 2+ messages in thread
* [Pljava-dev] Returning a complex type with potential null parameters
@ 2006-04-20 21:53
parent:
0 siblings, 0 replies; 2+ messages in thread
From: @ 2006-04-20 21:53 UTC (permalink / raw)
Caleb Land wrote:
> Is it possible to return a complex type with non-primitive argument
> types with PL/Java?
>
It certainly should be. Can you please log a bug on this?
Kind Regards,
Thomas Hallgren
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-04-20 21:53 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 21:47 [Pljava-dev] Returning a complex type with potential null parameters
2006-04-20 21:53 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox