pgsql-bugs(at)postgresql(dot)org writes:> create type f (input = int4in, output=int4out, internallength=4);
You forgot to specify PASSEDBYVALUE.
regards, tom lane