Re: Problem with memory in C function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Diogo Biazus <diogo(at)ikono(dot)com(dot)br>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with memory in C function
Date: 2004-03-27 02:38:15
Message-ID: 749.1080355095@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Diogo Biazus <diogo(at)ikono(dot)com(dot)br> writes:
> Am I doing something wrong?

You forgot to set up the length word that's required for a bytea value
(or any other variable-length datatype). The system is taking the first
four bytes of the file data as the datum length.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-03-27 02:42:40 Re: Waiting for Commit
Previous Message Tom Lane 2004-03-27 02:36:21 Re: Inserts get slower as table gets bigger