Re: can a function return a virtual table? - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: can a function return a virtual table?
Date
Msg-id 20050419111153.GA10314@wolff.to
Whole thread Raw
In response to Re: can a function return a virtual table?  (KÖPFERL Robert <robert.koepferl@sonorys.at>)
List pgsql-sql
On Tue, Apr 19, 2005 at 09:34:43 +0200, KÖPFERL Robert <robert.koepferl@sonorys.at> wrote:
> That was a nice answer - rather compleete.
> 
> However at least I am questioning myself for a long time about what happens
> if one does a select from a SRF. The function may return millions of records
> (i.e. select * from x where a>1). Is this data streamed through the query
> process or does postgres create a temporary table.
> 
> An "explain select * from srf()" just returns a function invocation. :-/
> How does this work?

If the function isn't written using a language of SQL, it isn't going to
optimize well when you only want to see part of the table.


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Query about SQL in PostgreSQL
Next
From: Andrew Sullivan
Date:
Subject: Re: Query about SQL in PostgreSQL