Re: passing array to database function - Mailing list pgsql-sql

From Achilleus Mantzios
Subject Re: passing array to database function
Date
Msg-id Pine.LNX.4.44.0602071403550.6338-100000@matrix.gatewaynet.com
Whole thread Raw
In response to Re: passing array to database function  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
O Richard Huxton έγραψε στις Feb 7, 2006 :

> padmanabha konkodi wrote:
> > Β hi everybody,
> > 
> > i want to pass Integer array to database function from java
> > precompiled statement.
> > 
> > java gives java.sql.Array interface but i dont know which
> > implementing class i have to use in postgre
> 
> I don't really "do" java, but have you tried an array of integers for 
> your PostgreSQL function? What happened?

The correct list is -jdbc.
Theoritically you would have to write your own implementation
of java.sql.Array.
Practically build a String with the contents you want
e.g.
'{1,2,3,4}' 
for a int[] array, and your done.

> 
> 

-- 
-Achilleus



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: passing array to database function
Next
From: Vic Rowan
Date:
Subject: problem referencing an attrib which is not unique