Re: C Programming with postgres.h - my function crashes - Mailing list pgsql-general

From Teodor Sigaev
Subject Re: C Programming with postgres.h - my function crashes
Date
Msg-id 3FCCDA0D.2060409@sigaev.ru
Whole thread Raw
In response to C Programming with postgres.h - my function crashes the database backend  (Alex Page <alex.page@cancer.org.uk>)
List pgsql-general
>
>   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@sigaev.ru


pgsql-general by date:

Previous
From: "Marc A. Leith"
Date:
Subject: Re: language war
Next
From: Jan Wieck
Date:
Subject: Re: language war