integer arrays

Поиск
Список
Период
Сортировка
От mlw
Тема integer arrays
Дата
Msg-id 3ADB459F.D6F5631D@mohawksoft.com
обсуждение исходный текст
Ответы Re: integer arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I have looked and I have looked, it is not immediately clear to me how integer
arrays are passed to C function.

create table fubar (vars integer[]) ;

select c_function(vars) from fubar;

insert into fubar (vars) values ('{1,2,3,4,5,6}');


........

extern "C" c_function (varlena var)
{int * pn = (int *)VARDATA(var);
}

Now, what should "pn" have in it? I don't see my values until later on in the
array. I guess I am asking is what is the format of this type, and more
importantly, where is it documented. I looked in catalog and pg_types but it
wasn't clear it was defined there.


-- 

I'm not offering myself as an example; every life evolves by its own laws.
------------------------
http://www.mohawksoft.com


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: 7.1 on 7.1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: integer arrays