Re: SPI_getvalue gives a core dump - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: SPI_getvalue gives a core dump
Date
Msg-id 25294.1154104707@sss.pgh.pa.us
Whole thread Raw
In response to Re: SPI_getvalue gives a core dump  (<vivek@staff.ownmail.com>)
List pgsql-interfaces
<vivek@staff.ownmail.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


pgsql-interfaces by date:

Previous
From:
Date:
Subject: Re: SPI_getvalue gives a core dump
Next
From:
Date:
Subject: Re: SPI_getvalue gives a core dump