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

From David Busby
Subject Creating a Function with C that returns bytea
Date
Msg-id 3D29D8D3.8080009@pnts.com
Whole thread Raw
Responses Re: Creating a Function with C that returns bytea  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
List,
    I'm building this function in C that will return a bytea (hopefully) and
cannot get it to return the bytea value.  Am I missing something really
simple


My code is similar to this:

#include <necessary files>
bytea *func() {
    bytea *x = palloc(36);
    // code to load the 36 bytes here
    return x;
}




pgsql-general by date:

Previous
From: Doug Fields
Date:
Subject: Re: WAL recycling, Linux 2.4.18
Next
From: Robert L Mathews
Date:
Subject: Re: I am being interviewed by OReilly