Re: Passing an array or record to a stored procedure in PostgreSQL

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Max Bourinov <bourinov(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Passing an array or record to a stored procedure in PostgreSQL
Date: 2011-05-18 13:29:54
Message-ID: BANLkTimeTdd_5mkEmRabFGqZ3RinPQjG4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 18, 2011 at 12:40 AM, Max Bourinov <bourinov(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-05-18 14:25:10 Re: Why not install pgstattuple by default?
Previous Message Leonardo Francalanci 2011-05-18 13:11:52 Re: use less space in xl_xact_commit patch