Arrays, JDBC and Postgresql Functions - Mailing list pgsql-general

From Hadley Willan
Subject Arrays, JDBC and Postgresql Functions
Date
Msg-id 1052433577.4920.14.camel@atlas.sol.deeper.co.nz
Whole thread Raw
List pgsql-general
Hello All,
   I was just reading the docs. And it's possible to have an array of
data-type in Postgresql, that's all good. However, I was wondering if,
1) I can pass an array into a function?
2) easily iterate through it's elements?
3) Using JDBC and the Postgresql driver pass a Vector of say, BIGINTs to
the function?

Why do I want to do this? Because I could the database perform a
majority some work server side, with a small network request.

Like, an order is consigned to a customer, however, the units on the
order are variable and once approved, I could call the function like,
fn_unit_consign_for_order( BIGINT, BIGINT[] ) where the $1 is the order
Id and BIGINT[] is the units from that order to consign.

Can anybody help thanks.

Hadley


pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: jdbc connection process size
Next
From: Tom Lane
Date:
Subject: Re: Error installing postgresql-7.3.2 (fixed, but Q remains...)