X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4795A9DC806 for ; Thu, 26 Jan 2006 08:54:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84901-04 for ; Thu, 26 Jan 2006 08:54:33 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by postgresql.org (Postfix) with ESMTP id 0D4439DC801 for ; Thu, 26 Jan 2006 08:54:27 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 13so360646nzn for ; Thu, 26 Jan 2006 04:54:31 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oLWRVaJf5fCVVIVcoNUaF/xUXUdHQi9yEOYeGNB5XMMHckXZkR6OesPazh7xcvCS1IyITKt7p0nOpJr+OcLUzGKdw8Tg8kIUIyyDc0cqC93G3idH23jGWqblMXcLGSkY5o1QYstPZE+HZJj+0nI/d+Q8tjf49pPKRP2ZstA/zKY= Received: by 10.65.196.16 with SMTP id y16mr1311100qbp; Thu, 26 Jan 2006 04:54:23 -0800 (PST) Received: by 10.65.135.12 with HTTP; Thu, 26 Jan 2006 04:54:23 -0800 (PST) Message-ID: <29d3b0b90601260454g35817213o7d5a0e8a1e53ddf7@mail.gmail.com> Date: Thu, 26 Jan 2006 13:54:23 +0100 From: andrew To: pgsql-sql@postgresql.org Subject: Re: filtering after join In-Reply-To: <200601261222.34906.peter_e@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <29d3b0b90601250927o2a5ee6e6mc33a7647da4438ce@mail.gmail.com> <200601261127.05442.peter_e@gmx.net> <29d3b0b90601260254n10d2c9aby77651744337020f8@mail.gmail.com> <200601261222.34906.peter_e@gmx.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.214 required=5 tests=[AWL=0.214] X-Spam-Score: 0.214 X-Spam-Level: X-Archive-Number: 200601/184 X-Sequence-Number: 23973 How will the query planner do for a nesting query? Treat the subqueries as multiple queries and then link them together? where can I find the information (codes or documents)? Thanks. On 1/26/06, Peter Eisentraut wrote: > andrew wrote: > > But the function foo() would produce different values for the two > > queries, so the result will be different. > > A simple example is foo() computes the sum of all the integer fields > > of the input record. > > OK, I see now where you're getting at. You want to combine the record > type of A and B into one. Then the proposed solution is right. > > -- > Peter Eisentraut > http://developer.postgresql.org/~petere/ > -- andrew