Re: ERROR: cache lookup failed for type 0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tzahi Fadida <tzahi_ml(at)myrealbox(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: cache lookup failed for type 0
Date: 2005-01-07 18:59:09
Message-ID: 28419.1105124349@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tzahi Fadida <tzahi_ml(at)myrealbox(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tzahi Fadida 2005-01-07 19:51:30 Re: ERROR: cache lookup failed for type 0
Previous Message David Fetter 2005-01-07 18:45:22 Re: PostgreSQL 8.0.0 Release Candidate 4