Re: Problem with array ... help!

From: Alexey Slynko <slynko(at)stack(dot)net>
To: Dave Cramer <Dave(at)micro-automation(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with array ... help!
Date: 2002-03-12 12:02:03
Message-ID: 20020312145641.G85024-100000@elizabet.stack.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


> Alexey,
>
> I believe there is has been a patch for this and the development driver
> should solve this problem.

Well, I solve this problem. I've patched the latest development version of
JDBC. There is a patch:

*** src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java.orig
Tue Mar 12 14:49:59 2002
--- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java Tue Mar 12
14:50:22 2002
***************
*** 767,772 ****
--- 767,774 ----
case Types.BINARY:
case Types.VARBINARY:
return getBytes(columnIndex);
+ case Types.ARRAY:
+ return getArray(columnIndex);
default:
String type = field.getPGType();
// if the backend doesn't know the type
then coerce to String

>
>
> Dave
> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Alexey Slynko
> Sent: Tuesday, March 12, 2002 4:50 AM
> To: pgsql-jdbc(at)postgresql(dot)org
> Subject: [JDBC] Problem with array ... help!
>
>
> I have a table with column type int[], for example:
> CREATE TABLE test (
> id int[],
> description text
> );
>
> When I try to get some data from this table (i.e. SELECT * FROM test),
> JDBC create an exception: "Class names may not have _ in them. You
> supplied {0}." What does it mean ? Can anyone post example for working
> with arrays in JDBC ? Please, help...
>
> Thanks,
>
> Alexey Slynko
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>
>

Alexey Slynko
Stack Technology
E-mail: slynko(at)stack(dot)net
Tel.: +7(095)939-85-86 (130)

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message TimothyReaves 2002-03-12 13:52:02 SQLException subclasses
Previous Message Dave Cramer 2002-03-12 10:34:38 Re: Problem with array ... help!