Re: SPI_getvalue gives a core dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vivek(at)staff(dot)ownmail(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: SPI_getvalue gives a core dump
Date: 2006-07-28 16:38:27
Message-ID: 25294.1154104707@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

<vivek(at)staff(dot)ownmail(dot)com> writes:
> i = DatumGetInt64(SPI_getbinval(SPI_tuptable->vals[0], tupdesc, 1, &isnull));

I think this is your problem: you're trying to use the wrong tupdesc to
retrieve from the SELECT count(*) result. SPI_tuptable->tupdesc would
work better there.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message vivek 2006-07-28 17:02:14 Re: SPI_getvalue gives a core dump
Previous Message vivek 2006-07-28 16:27:58 Re: SPI_getvalue gives a core dump