Ines Klimann <[EMAIL PROTECTED]> writes:
> I have tried this :
> ----------------------------------
> create function personne_in(text)
> returns personne
> as 'select $1;'
> language 'sql';

> create function personne_out(text)
> returns text
> as 'select $1;'
> language 'sql';

> create type personne (
> internallength = variable,
> input = personne_in,
> output = personne_out
> );
> ---------------------------------
> but it is full of mistakes.

Can't do it that way, because SQL functions can't produce or consume
the plain C strings that input/output conversion functions have to
deal with.  There's really no way to write an input or output function
except in C.

                        regards, tom lane

Reply via email to