agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] ResultSetProvider/ResultSetHandle problem
2+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] ResultSetProvider/ResultSetHandle problem
@ 2005-10-03 11:58
2005-10-03 13:02 ` [Pljava-dev] ResultSetProvider/ResultSetHandle problem
0 siblings, 1 reply; 2+ messages in thread
From: @ 2005-10-03 11:58 UTC (permalink / raw)
I have a function returning set of "record", i.e. there is no information about the target structure to return until it is actually called.
It works, but if I call such a function several times with different target structures within one session, I got one of two following errors:
a)
org.postgresql.pljava.internal.ServerException: query-specified return row and actual function return row do not match
at org.postgresql.pljava.internal.Portal._fetch(Native Method)
at org.postgresql.pljava.internal.Portal.fetch(Portal.java:79)
at org.postgresql.pljava.jdbc.SPIResultSet.getTupleTable(SPIResultSet.java:135)
at org.postgresql.pljava.jdbc.SPIResultSet.peekNext(SPIResultSet.java:157)
at org.postgresql.pljava.jdbc.SPIResultSet.next(SPIResultSet.java:80)
at org.postgresql.pljava.internal.ResultSetPicker.assignRowValues(ResultSetPicker.java:31)
<2005-10-03 13:51:16 CEST 25858>ERROR: query-specified return row and actual function return row do not match
b)
org.postgresql.pljava.internal.ServerException: java.lang.ArrayIndexOutOfBoundsException: 2
at org.postgresql.pljava.internal.Portal._fetch(Native Method)
at org.postgresql.pljava.internal.Portal.fetch(Portal.java:79)
at org.postgresql.pljava.jdbc.SPIResultSet.getTupleTable(SPIResultSet.java:135)
at org.postgresql.pljava.jdbc.SPIResultSet.peekNext(SPIResultSet.java:157)
at org.postgresql.pljava.jdbc.SPIResultSet.next(SPIResultSet.java:80)
at org.postgresql.pljava.internal.ResultSetPicker.assignRowValues(ResultSetPicker.java:31)
<2005-10-03 13:49:43 CEST 25652>ERROR: java.lang.ArrayIndexOutOfBoundsException: 2
It seems that something is cached, though it should be replaced by a new version when called with different target structure.
Note: plpgsql functions are OK, it seems to be a problem of pljava, not PostgreSQL.
Should I write it to the bug list?
Regards
Filip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20051003/e29a65ca/attachment.html;
^ permalink raw reply [nested|flat] 2+ messages in thread
* [Pljava-dev] ResultSetProvider/ResultSetHandle problem
2005-10-03 11:58 [Pljava-dev] ResultSetProvider/ResultSetHandle problem
@ 2005-10-03 13:02 `
0 siblings, 0 replies; 2+ messages in thread
From: @ 2005-10-03 13:02 UTC (permalink / raw)
Hi Filip,
I've seen this. When I looked more deeply I concluded that it indeed was
a PostgreSQL limitation. I guess I now have to revise that :-)
So sure, add it to the bug list.
Regards,
Thomas Hallgren
Filip Hrbek wrote:
> I have a function returning set of "record", i.e. there is no
> information about the target structure to return until it is actually
> called.
> It works, but if I call such a function several times with different
> target structures within one session, I got one of two following errors:
>
> a)
> org.postgresql.pljava.internal.ServerException: query-specified return
> row and actual function return row do not match
> at org.postgresql.pljava.internal.Portal._fetch(Native Method)
> at org.postgresql.pljava.internal.Portal.fetch(Portal.java:79)
> at
> org.postgresql.pljava.jdbc.SPIResultSet.getTupleTable(SPIResultSet.java:135)
> at
> org.postgresql.pljava.jdbc.SPIResultSet.peekNext(SPIResultSet.java:157)
> at
> org.postgresql.pljava.jdbc.SPIResultSet.next(SPIResultSet.java:80)
> at
> org.postgresql.pljava.internal.ResultSetPicker.assignRowValues(ResultSetPicker.java:31)
> <2005-10-03 13:51:16 CEST 25858>ERROR: query-specified return row and
> actual function return row do not match
> b)
> org.postgresql.pljava.internal.ServerException:
> java.lang.ArrayIndexOutOfBoundsException: 2
> at org.postgresql.pljava.internal.Portal._fetch(Native Method)
> at org.postgresql.pljava.internal.Portal.fetch(Portal.java:79)
> at
> org.postgresql.pljava.jdbc.SPIResultSet.getTupleTable(SPIResultSet.java:135)
> at
> org.postgresql.pljava.jdbc.SPIResultSet.peekNext(SPIResultSet.java:157)
> at
> org.postgresql.pljava.jdbc.SPIResultSet.next(SPIResultSet.java:80)
> at
> org.postgresql.pljava.internal.ResultSetPicker.assignRowValues(ResultSetPicker.java:31)
> <2005-10-03 13:49:43 CEST 25652>ERROR:
> java.lang.ArrayIndexOutOfBoundsException: 2
> It seems that something is cached, though it should be replaced by a
> new version when called with different target structure.
>
> Note: plpgsql functions are OK, it seems to be a problem of pljava,
> not PostgreSQL.
>
> Should I write it to the bug list?
>
> Regards
> Filip
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Pljava-dev mailing list
>Pljava-dev at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-10-03 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-03 11:58 [Pljava-dev] ResultSetProvider/ResultSetHandle problem
2005-10-03 13:02 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox