returning a setof tuples like a subquery was(RE: ERROR: cache lookup failed for type 0 ) - Mailing list pgsql-general

From Tzahi Fadida
Subject returning a setof tuples like a subquery was(RE: ERROR: cache lookup failed for type 0 )
Date
Msg-id 019c01c4f50c$30bfdef0$0b00a8c0@llord
Whole thread Raw
In response to Re: ERROR: cache lookup failed for type 0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
yes you were right it works now.
10x, sorry for the rookie mistake I jumped the gun on the last one.
If you will i have another question on the same subject.
I want to return a setof tuples without a predetermined return type
like a subquery with a join, I don't want to specify a type.
for example, new_join_alg_func(table1,table2).
when I use SETOF RECORD I have to specify a type, same goes
for anyelement.

Regards,
    tzahi.

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Tom Lane
> Sent: Saturday, January 08, 2005 12:24 AM
> To: Tzahi Fadida
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] ERROR: cache lookup failed for type 0
>
>
> Tzahi Fadida <tzahi_ml@myrealbox.com> writes:
> > well, I tried the heap_deformtuple and I am getting now: select
> > testgetrows(); server closed the connection unexpectedly
>
> You didn't palloc the values array.  Any reasonable compiler
> would have warned you about that BTW.  If you don't have
> compiler warnings enabled, learn to use them.
>
> Also, I'd recommend using the tupledesc from the just-opened
> lRel; fetching it via an independent path is just asking for trouble.
>
>             regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: cache lookup failed for type 0
Next
From: Michael Fuhr
Date:
Subject: Re: Problem creating trigger-function with arguments (8.0rc4)