David Busby <busby(at)pnts(dot)com> writes:
> My code is similar to this:
> #include <necessary files>
> bytea *func() {
> bytea *x = palloc(36);
> // code to load the 36 bytes here
> return x;
> }
Are you setting the bytea's length word correctly?
regards, tom lane