Re: arrays of floating point numbers / linear algebra operations into the DB

Поиск
Список
Период
Сортировка
От Enrico Sirola
Тема Re: arrays of floating point numbers / linear algebra operations into the DB
Дата
Msg-id 47A5ED57.8070606@gmail.com
обсуждение исходный текст
Ответ на Re: arrays of floating point numbers / linear algebra operations into the DB  (Enrico Sirola <enrico.sirola@gmail.com>)
Список pgsql-general
I respond myself:

Enrico Sirola ha scritto:

[...]

> seems to work). The problem for the code above is that it doesn't work
> for vectors longer than 1000 elements or so (try it with 2000 and it
> doesn't work). I guess I should manage the "toasting" machinery in some
> ways - any suggestion is appreciated

wrong. it was just that I forgot to add ARR_OVERHEAD_NONULLS(ndims1) to
the mem allocation for rv:

rv = (ArrayType *) palloc(nbytes);

becomes

rv = (ArrayType *) palloc(nbytes) +  ARR_OVERHEAD_NONULLS(ndims1);

and now it seems to work :)

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: temp sequence
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: [OT] "advanced" database design (long)