Array Support

View: New views
3 Messages — Rating Filter:   Alert me  

Array Support

by Edwin Ramirez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just started using PL/Java and it works very well.  Compared to what
has to be done in Oracle to start creating functions in Java, it is 100
times easier.

In Oracle, I have functions like:

CREATE OR REPLACE FUNCTION count(match varchar,neg varchar,args vNum)
RETURN number deterministic as language java name
'whdpPkg.countMatch(java.lang.String, java.lang.String,oracle.sql.ARRAY)
return double';

Where "vNum" is a: CREATE OR REPLACE TYPE vNum as TABLE OF NUMBER;
Basically, an array of numbers (numerics).

Ideally in Postgres/PLJava I would like to:

CREATE OR REPLACE FUNCTION count(match varchar,neg varchar, args
numeric[]) RETURNS numeric as 'whdpPkg.countMatch(java.lang.String,
java.lang.String, ?????)' LANGUAGE java;


Is this possible? Is there a "oracle.sql.ARRAY" equivalent for Postgres?
What work is required to support something like this?

Thanks,

--
Edwin S. Ramirez, Senior Developer
Information Technology Department - ITDC
Mount Sinai Medical Center


_______________________________________________
Pljava-dev mailing list
Pljava-dev@...
http://pgfoundry.org/mailman/listinfo/pljava-dev

Re: Array Support

by Kris Jurka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Tue, 27 Jan 2009, Edwin Ramirez wrote:

> CREATE OR REPLACE FUNCTION count(match varchar,neg varchar, args
> numeric[]) RETURNS numeric as 'whdpPkg.countMatch(java.lang.String,
> java.lang.String, ?????)' LANGUAGE java;
>
>
> Is this possible? Is there a "oracle.sql.ARRAY" equivalent for Postgres?
> What work is required to support something like this?
>

I believe you want "java.math.BigDecimal[]".

Kris Jurka
_______________________________________________
Pljava-dev mailing list
Pljava-dev@...
http://pgfoundry.org/mailman/listinfo/pljava-dev

Re: Array Support

by Edwin Ramirez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your reply.  I will try your suggestion and let you know how it goes.

Edwin S. Ramirez
             


----- Original Message -----
From: Kris Jurka <books@...>
Date: Wednesday, January 28, 2009 4:24 am
Subject: Re: [Pljava-dev] Array Support
To: Edwin Ramirez <Edwin.Ramirez@...>
Cc: pljava-dev@...

>
>
> On Tue, 27 Jan 2009, Edwin Ramirez wrote:
>
> > CREATE OR REPLACE FUNCTION count(match varchar,neg varchar, args
> > numeric[]) RETURNS numeric as 'whdpPkg.countMatch(java.lang.String,
> > java.lang.String, ?????)' LANGUAGE java;
> >
> >
> > Is this possible? Is there a "oracle.sql.ARRAY" equivalent for
> Postgres?> What work is required to support something like this?
> >
>
> I believe you want "java.math.BigDecimal[]".
>
> Kris Jurka
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev@...
> http://pgfoundry.org/mailman/listinfo/pljava-dev
>
_______________________________________________
Pljava-dev mailing list
Pljava-dev@...
http://pgfoundry.org/mailman/listinfo/pljava-dev