"Kevin Martins" <martins506@xxxxxxxxxxx> writes: > I've been working with SRF and i want to return a setof record but i > keep getting this error ´cache lookup failed for type 18867840´ That seems unlikely to be related to the code you've shown us. Have you tried back-tracing from errfinish() to find out where the error is being thrown? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq