Обсуждение: C-Type for bit(n) string in user-defined function

Поиск
Список
Период
Сортировка

C-Type for bit(n) string in user-defined function

От
Maximilian Link
Дата:
Hi,

i want to write a user-defined function using a bit(384)-type. Which C
Type and PG_GETARG_xxx() do i use? i couldn't find anything on
http://www.postgresql.org/docs/9.1/static/xfunc-c.html .

Thanks for any help,
Maximilian


Re: C-Type for bit(n) string in user-defined function

От
Tom Lane
Дата:
Maximilian Link <maximilian-link@web.de> writes:
> i want to write a user-defined function using a bit(384)-type. Which C
> Type and PG_GETARG_xxx() do i use? i couldn't find anything on
> http://www.postgresql.org/docs/9.1/static/xfunc-c.html .

Look at the built-in functions for the type, which are (mostly at least)
in src/backend/utils/adt/varbit.c.

            regards, tom lane