>
> Datum enum_gender_in(PG_FUNCTION_ARGS) {
> text *invalue = PG_GETARG_TEXT_P(0);
>
> PG_FUNCTION_INFO_V1(enum_gender_out);
>
> Datum enum_gender_out(PG_FUNCTION_ARGS) {
> PG_RETURN_TEXT_P (outvalue);
> }
IN function takes a C-string, not a text and
OUT functions should return C-string, not a text.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru