pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: KÖPFERL Robert <robert.koepferl@sonorys.at>
Cc: pgsql-sql@postgresql.org
Subject: Re: can a function return a virtual table?
Date: Tue, 19 Apr 2005 06:11:53 -0500
Message-ID: <20050419111153.GA10314@wolff.to> (raw)
In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB166BC@neptun.sonorys.at>
References: <ED4E30DD9C43D5118DFB00508BBBA76EB166BC@neptun.sonorys.at>

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.



view thread (6+ messages)  latest in thread

Message-ID: <20050419111153.GA10314@wolff.to>
Permalink:  ../20050419111153.GA10314@wolff.to/
Also on:    postgresql.org/message-id/20050419111153.GA10314@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bruno@wolff.to, robert.koepferl@sonorys.at
  Subject: Re: can a function return a virtual table?
  In-Reply-To: <20050419111153.GA10314@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox