| От | Tom Lane |
|---|---|
| Тема | Re: arrays as input parameter for c functions |
| Дата | |
| Msg-id | 9256.1026481420@sss.pgh.pa.us обсуждение |
| Ответ на | arrays as input parameter for c functions (Alexaki Sofia <alexaki@ics.forth.gr>) |
| Ответы |
Re: arrays as input parameter for c functions
|
| Список | pgsql-interfaces |
Alexaki Sofia <alexaki@ics.forth.gr> writes:
> I want to add a c function in PostgreSQL (7.2.1)
> Is it possible the input parametrs othe function to be
> arrays of text (i.e., text *temp[10])?
You can certainly make the function take a "text[]", but it's not
going to be spoon-fed to you as a C array; you'll need to break down
the array value yourself. See deconstruct_array. (The aggregate
support functions for numeric avg/stddev/etc might be useful examples
of interpreting and constructing arrays of varlena datums.)
regards, tom lane
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера