Tomasz Myrta <jasiek(at)klaster(dot)net> writes:
> Do you know anything about good source of C functions documentation and
> examples?
Look in the main sources (backend/utils/adt/, mostly) and/or contrib
modules for functions that do something like what you need. The only
difference between a builtin function and a dynamically loaded one is
you have to add the PG_FUNCTION_INFO macro.
regards, tom lane