[Pljava-dev] Arrays support for object views

From: yazuna at gmail(dot)com (Krzysztof Nienartowicz)
To:
Subject: [Pljava-dev] Arrays support for object views
Date: 2008-09-23 16:29:54
Message-ID: 707ef6b40809230929p66557facy414f760052fab9ab@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Hello,
Thanks for the nice project. I encountered some traces of efforts to use
arrays from within pljava but could not find a working example.
I'm trying to create a function that would return a setof complex objects
where some fields of the object are plain old dataype arrays. i.e.:

CREATE TYPE tsTest2 AS
(
id bigint ,
tsType integer ,
residuals boolean ,
length integer,
obs float8[]
) ;

then I create a mapping function:

CREATE or replace FUNCTION tt2(integer ,float8 , float8 , float8 )
RETURNS SETOF tstest2
AS 'gaia.cu7.omimpl.TimeSeriesImplSQL.timeseriesReturn'
IMMUTABLE LANGUAGE javaU;

then, whatever I try to do in a java code for assignRowValues fails:
i.e.: receiver.updateString(6, "{1.0,2.0,3.0}");
would result in:

-- Executing query:
select tt2(0,0.0,0.0,0.0);

ERROR: java.sql.SQLException: Cannot derive a value of class
[Ljava.lang.Double; from an object of class java.lang.String

you do have updateArray but could not spot any usage example with it.
Please help, otherwise we will have to drop pljava from the project which
has a chance to impact astronomy community thus leverage pljava.
Best regards,
Krzysztof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20080923/b21a2004/attachment.html>

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Krzysztof Nienartowicz 2008-09-26 14:02:01 [Pljava-dev] Arrays support for object views
Previous Message Thomas Hallgren 2008-09-12 07:32:38 [Pljava-dev] error JNI_CreateJavaVM