Re: Calling a stored procedure with an array parameter - Mailing list pgsql-odbc

From Heikki Linnakangas
Subject Re: Calling a stored procedure with an array parameter
Date
Msg-id 520D0B27.1010504@vmware.com
Whole thread Raw
In response to Calling a stored procedure with an array parameter  (Andrei Gheorghe <andreigheorghe165@yahoo.com>)
Responses Re: Calling a stored procedure with an array parameter  (Andrei Gheorghe <andreigheorghe165@yahoo.com>)
List pgsql-odbc
On 13.08.2013 11:32, Andrei Gheorghe wrote:
> Hello
>
> I would like to know if I can use the postgres ODBC driver to call a stored procedure with an array parameter. I've
managedto do it by binding the parameter as SQL_CHAR with a value like { value1, value 2 }but I would like to know if
there'sanother more efficient way. 

There's no straightforward way to create an array value in the client
and send it as a query parameter. You could call it with something this
though:

SELECT my_stored_procedure(ARRAY[?,?,?,?]);

Fill in the parameters with the individual values, and the server will
construct the array from them.

- Heikki


pgsql-odbc by date:

Previous
From: Heikki Linnakangas
Date:
Subject: UseServerSidePrepare and data-at-execution
Next
From: Heikki Linnakangas
Date:
Subject: Re: About FetchBufferSize and row caching for postgres odbc