Re: Passing an array or record to a stored procedure in PostgreSQL - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Passing an array or record to a stored procedure in PostgreSQL
Date
Msg-id BANLkTimeTdd_5mkEmRabFGqZ3RinPQjG4A@mail.gmail.com
Whole thread Raw
In response to Passing an array or record to a stored procedure in PostgreSQL  (Max Bourinov <bourinov@gmail.com>)
List pgsql-hackers
On Wed, May 18, 2011 at 12:40 AM, Max Bourinov <bourinov@gmail.com> wrote:
> Hi Highly Respected Hackers!
>
> I have a task to pass arrays, records and in some cases array of
> records as a parameter to the stored procedures in PostgreSQL. I will
> use JDBC to work with PostgreSQL 9.0 At first I would like to learn
> how to pass arrays.

This is more of a question for the -general list than -hackers.  The
one way to pass arrays/reccords/etc that is guaranteed to work is to
construct a text literal that postgres understands which represents
the structures you would like to send.  There might be simpler/better
ways but that is mostly going to depend on the JDBC driver.

merlin


pgsql-hackers by date:

Previous
From: Leonardo Francalanci
Date:
Subject: Re: use less space in xl_xact_commit patch
Next
From: Greg Smith
Date:
Subject: Re: Why not install pgstattuple by default?