| От | Tom Lane |
|---|---|
| Тема | Re: Array elements (urgent help needed) |
| Дата | |
| Msg-id | 14101.1097255879@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Array elements (urgent help needed) (Akbar Mokhtarani <akbarm@slac.stanford.edu>) |
| Список | pgsql-interfaces |
Akbar Mokhtarani <akbarm@slac.stanford.edu> writes:
* A standard varlena array has the following internal structure:
This didn't quite agree with what I found but it gave me a starting point.
That's because it's describing the *internal* structure. Since you're
on 7.4, what you are actually seeing is the on-the-wire representation
emitted by array_send(), which looks like:
/* Send the array header information */pq_sendint(&buf, ndim, 4);pq_sendint(&buf, v->flags, 4);pq_sendint(&buf,
element_type,sizeof(Oid));for (i = 0; i < ndim; i++){ pq_sendint(&buf, ARR_DIMS(v)[i], 4); pq_sendint(&buf,
ARR_LBOUND(v)[i],4);}
/* Send the array elements using the element's own sendproc *//* (so N element values in whatever the datatype format
is)*/
regards, tom lane
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера