A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
Joined: Jul 03, 2007
Jul 08, 2008 14:55:00
I was wondering if anyone could help me figure out Postgres arrays with
I have a connection to the database and I can put Data into the text array, but I can't seem to get it back out.
I'm also not sure I am even storing it properly. It is an array of text or text type. To store it I build a
in the following format:
That seems to be the way the postgres documentation indicates to store it. Is this the correct way to store a text type?
Also, how do I read it out. I see
has a getArray method, and I tried the following:
List list= Arrays.asList(rs.getArray("COLUMNNAME").getArray());
Then if I do list.get(0) I get something like [Ljava.lang.String;@1e1962d which seems to be a reference to an array object of Type String.
Some help with this would be great!
I agree. Here's the link:
- it saves me about five hours per week
subject: Postgres Arrays
Cast Object to Object
Dynamic NxN matrix
size of 2D array
how to get data from a db into an array?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013