Roberto Mello <[EMAIL PROTECTED]> writes:
> What would the functions my_procedure_1 and my_procedure_2 look like?

src/backend/utils/adt/ is full of examples of datatype I/O procedures.
Pick an existing type that does something vaguely like your type
(at the very least pick one that uses the same kind of representation:
pass-by-value, fixed-length pass-by-reference, or variable-length),
and use its code as a model.

The only thing you need to do differently in dynamically loaded C code
than is done in the main sources is to declare version-1 calling
convention functions with PG_FUNCTION_INFO_V1().  This is assumed for
builtin functions as of 7.1, but the default for dynamically loaded
functions is to assume old-style calling conventions.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to