Re: Calling a stored procedure with an array parameter

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Calling a stored procedure with an array parameter
Дата
Msg-id 520D0B27.1010504@vmware.com
обсуждение исходный текст
Ответ на Calling a stored procedure with an array parameter  (Andrei Gheorghe <andreigheorghe165@yahoo.com>)
Ответы Re: Calling a stored procedure with an array parameter  (Andrei Gheorghe <andreigheorghe165@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: UseServerSidePrepare and data-at-execution
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: About FetchBufferSize and row caching for postgres odbc