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