Re: Question about array read using protocol 3.0 implementation in C#

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question about array read using protocol 3.0 implementation in C#
Дата
Msg-id 24818.1056925758@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Question about array read using protocol 3.0 implementation in C#  (Carlos Guzman Alvarez <carlosga@telefonica.net>)
Ответы Re: Question about array read using protocol 3.0 implementation  (Carlos Guzman Alvarez <carlosga@telefonica.net>)
Re: Question about array read using protocol 3.0 implementation  (Carlos Guzman Alvarez <carlosga@telefonica.net>)
Список pgsql-hackers
Carlos Guzman Alvarez <carlosga@telefonica.net> writes:
> I'm trying to read an array, using binary format code and my own 
> implementation of the 3.0 protocol in C#, at this moment i have made 
> test with arrays of int2 and float4,  seems that the server sends a 
> header of 24 bytes before the data in the buffer, i need to know what 
> these 24 bytes mean :),

Use the source Luke ... array_send, in backend/utils/adt/arrayfuncs.c,
does this:
/* 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);}
 

I believe flags is always 0 at the moment; it might be a good idea
to punt if you see a nonzero there.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PlPython
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: PlPython