Skip site navigation (1) Skip section navigation (2)

Re: AW: functions returning records

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: AW: functions returning records
Date: 2001-06-27 12:30:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, 27 Jun 2001, Zeugswetter Andreas SB wrote:

> > >  select name1, name2 from foo() where name1 > 10;
> > > 
> > >  What returns foo()? ...the pointer to HeapTuple or something like this or
> > > pointer to some temp table?
> > Pointer to heaptuple. We can get to tupdesc for that tuple by looking up
> > its prorettype.
> But the question is how you get the next row. Do you return a null terminated 
> array of heaptuples ?
> Imho to allow this to be efficient, there would need to be some mechanism, 
> that would allow the function to return the result in small blocks (e.g. each row)
> (similar to a heap access), else you would be limited to return 
> values, that fit into memory, or fit on temporary disk storage, and do 
> work that might not even be required, because the client only fetches the 
> first row.
I haven't thought of this yet, but its a good point. I think I'll find out
what's involved when I write code for it. :)


In response to

pgsql-hackers by date

Next:From: Alex PilosovDate: 2001-06-27 12:42:07
Subject: Re: AW: functions returning records
Previous:From: Karel ZakDate: 2001-06-27 12:09:38
Subject: Re: AW: functions returning records

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group