From: | vorarlberger at gmail(dot)com (Vorarlberger) |
---|---|
To: | |
Subject: | [Pljava-dev] Return a Anonymous ResultSet |
Date: | 2011-09-08 11:04:08 |
Message-ID: | CALtUeZb3ry94GHV-WFea9go9aHY1PMEma+KU8NwXinc1anY=WQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
>
> That still doesn't explain how you mean the return value to be defined
> on the SQL side. As in
>
> Ok, sorry I thougt it was clear since the subject of this thread is "Return
a Anonymous ResultSet"
> CREATE FUNCTION foo() RETURNS <say what?> AS 'Foo.foo' LANGUAGE
> JAVA;
>
CREATE FUNCTION foo() RETURNS RECORD AS 'Foo.foo' LANGUAGE
JAVA;
> If you can explain what you mean to achieve in terms of other embedded
> languages or language neutral we have a discussion. Until then I'll
> remain perplexed.
>
Her a plpgsql example
create or replace function foo()
returns record as
$$
declare
r record;
begin
-- only my java objecft do know the columns list
select 'a'::varchar(10) as a , now() as b into r;
return r;
end;
$$
language plpgsql;
select foo();
postgres=# select foo();
foo
----------------------------------
(a,"2011-09-08 12:59:34.141+02")
(1 Zeile)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20110908/490f7f36/attachment.html>
From | Date | Subject | |
---|---|---|---|
Next Message | Larry | 2011-09-12 17:42:15 | [Pljava-dev] java.lang.SecurityException: Can’t read standard JDK classes |
Previous Message | Johann 'Myrkraverk' Oskarsson | 2011-09-07 22:10:57 | [Pljava-dev] Return a Anonymous ResultSet |