Re: Array elements (urgent help needed)

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Akbar Mokhtarani
Дата:
Сообщение: Re: Array elements (urgent help needed)
Следующее
От: "Israel Urquieta Vargas"
Дата:
Сообщение: PGacces