From: Helmar Spangenberg <hspangenberg@frey.de>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5769: Problem with SPI_getvalue
Date: Thu, 25 Nov 2010 16:38:02 +0100
Message-ID: <201011251638.02062.hspangenberg@frey.de> (raw)
In-Reply-To: <4CEE7C87.50909@enterprisedb.com>
References: <201011251145.oAPBjweK020676@wwwmaster.postgresql.org>
<4CEE7C87.50909@enterprisedb.com>
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@frey.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.
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hspangenberg@frey.de, heikki.linnakangas@enterprisedb.com
Subject: Re: BUG #5769: Problem with SPI_getvalue
In-Reply-To: <201011251638.02062.hspangenberg@frey.de>
References: <201011251145.oAPBjweK020676@wwwmaster.postgresql.org> <4CEE7C87.50909@enterprisedb.com> <201011251638.02062.hspangenberg@frey.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox