Re: Creating a Function with C that returns bytea - Mailing list pgsql-general

From Tom Lane
Subject Re: Creating a Function with C that returns bytea
Date
Msg-id 3636.1026222301@sss.pgh.pa.us
Whole thread Raw
In response to Creating a Function with C that returns bytea  (David Busby <busby@pnts.com>)
List pgsql-general
David Busby <busby@pnts.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

pgsql-general by date:

Previous
From: "Iavor Raytchev"
Date:
Subject: Re: [INTERFACES] pgaccess problems
Next
From: Curt Sampson
Date:
Subject: Re: I am being interviewed by OReilly