Skip site navigation (1) Skip section navigation (2)

Re: Memory Allocation Error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "zhuge xiao" <zhuge(at)Rinaix(dot)cn>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Memory Allocation Error
Date: 2007-09-24 14:49:44
Message-ID: 13873.1190645384@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> "zhuge xiao" <zhuge(at)Rinaix(dot)cn> writes:
>> I wrote and compiled and linked a C function, add_float, which returns
>> float in C like following:

> float8 and float aren't the same thing. "float" is a C data type which is not
> wide enough to hold a float8. The first line actually works by shortening it
> but the return doesn't work because it returns a pointer to the float and
> claims it's a pointer to the float8.

I don't think that's the problem, because PG_RETURN_FLOAT8 doesn't
actually do that.  More likely is confusion between float4 and
float8 in the SQL declaration of the function.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Pedro GimenoDate: 2007-09-24 16:50:21
Subject: Re: BUG #3628: Wrong schema picked
Previous:From: Dave PageDate: 2007-09-24 13:06:31
Subject: Re: BUG #3616: PgAdminIII crashes on copy operation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group