Re: ERROR: cache lookup failed for type 0 - Mailing list pgsql-general

From Tom Lane
Subject Re: ERROR: cache lookup failed for type 0
Date
Msg-id 28419.1105124349@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: cache lookup failed for type 0  (Tzahi Fadida <tzahi_ml@myrealbox.com>)
Responses Re: ERROR: cache lookup failed for type 0
List pgsql-general
Tzahi Fadida <tzahi_ml@myrealbox.com> writes:
> Hi, I am learning how to use the c functions and my function below works
> when I do:
> select testgetrows();
> but when I do select * from testgetrows(); I am getting:
> "ERROR:  cache lookup failed for type 0"
> Whats's the problem?

I don't think it's safe to do HeapTupleGetDatum() directly on a tuple
obtained from heap_getnext.  You need to copy it.

            regards, tom lane

pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: [ANNOUNCE] PostgreSQL 8.0.0 Release Candidate 4
Next
From: Tzahi Fadida
Date:
Subject: Re: ERROR: cache lookup failed for type 0