Re: Creating a Function with C that returns bytea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: busby(at)pnts(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating a Function with C that returns bytea
Date: 2002-07-09 13:45:01
Message-ID: 3636.1026222301@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carmen Wai 2002-07-09 14:06:57 LOAD command not updating the recompiled object code
Previous Message Johnson, Shaunn 2002-07-09 13:20:02 PostgreSQL / Reporting tool