From: redhatdude at gmail.com (Caleb Land) Date: Thu, 20 Apr 2006 17:47:51 -0400 Subject: [Pljava-dev] Returning a complex type with potential null parameters Message-ID: 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: