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

Re: BUG #5769: Problem with SPI_getvalue

From: Helmar Spangenberg <hspangenberg(at)frey(dot)de>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5769: Problem with SPI_getvalue
Date: 2010-11-25 15:38:02
Message-ID: 201011251638.02062.hspangenberg@frey.de (view raw or flat)
Thread:
Lists: pgsql-bugs
You are right.
In my case I obviously had corrupted the heap somewhere else - now it works as 
expected.

Thanks for your quick answer,
Helmar

Am Donnerstag, 25. November 2010 16:11:03 schrieb Heikki Linnakangas:
> On 25.11.2010 13:45, Helmar Spangenberg wrote:
> > Bug reference:      5769
> > Logged by:          Helmar Spangenberg
> > Email address:      hspangenberg(at)frey(dot)de
> > PostgreSQL version: 9.0.1
> > Operating system:   Linux
> > Description:        Problem with SPI_getvalue
> > Details:
> >
> > Referring to the manual, I can pfree the result returned by SPI_getvalue.
> > However the backend crashes as soon as I use pfree.
> >
> > No example uses pfree. Could it be possible, there is a bug in the
> > documentation?
> 
> The return value of SPI_getvalue is certainly palloc()'d, so pfree()ing
> it should not crash. Perhaps you are trying to pfree() it after the
> whole memory context has already been destroyed. Or perhaps SPI_getvalue
> returned a NULL and you're trying to pfree() that. Can't say without
> more details.
> 


In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2010-11-25 16:20:38
Subject: Re: BUG #5769: Problem with SPI_getvalue
Previous:From: Heikki LinnakangasDate: 2010-11-25 15:11:03
Subject: Re: BUG #5769: Problem with SPI_getvalue

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