| От | Tom Lane |
|---|---|
| Тема | Re: How can I pass an array to SPI_execute_with_args()? |
| Дата | |
| Msg-id | 20614.1257366377@sss.pgh.pa.us обсуждение |
| Ответ на | How can I pass an array to SPI_execute_with_args()? (Boszormenyi Zoltan <zb@cybertec.at>) |
| Ответы |
Re: How can I pass an array to SPI_execute_with_args()?
|
| Список | pgsql-general |
Boszormenyi Zoltan <zb@cybertec.at> writes:
> I would like to execute the code below.
Since you're apparently deconstructing and reconstructing the array
anyway, why don't you do the insertion at the C-array stage, and
do just one construct_array() that yields the final result?
> If the above marked line sets oids[1] = INT8OID, I get this error:
> ERROR: function array_append(anyarray, bigint) does not exist
> LINE 1: UPDATE product.t_product_inv SET ids = array_append($1, $2) ...
> ^
You'd need to use the types int8[] and int8, explicitly. No ANYARRAY.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера