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 922DC9DC801 for ; Thu, 26 Jan 2006 07:22:36 -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 69471-02 for ; Thu, 26 Jan 2006 07:22:38 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.net [213.165.64.21]) by postgresql.org (Postfix) with SMTP id C48A49DC811 for ; Thu, 26 Jan 2006 07:22:33 -0400 (AST) Received: (qmail invoked by alias); 26 Jan 2006 11:22:36 -0000 Received: from dslb-084-063-027-189.pools.arcor-ip.net (EHLO colt.pezone.net) [84.63.27.189] by mail.gmx.net (mp037) with SMTP; 26 Jan 2006 12:22:36 +0100 X-Authenticated: #495269 From: Peter Eisentraut To: pgsql-sql@postgresql.org Subject: Re: filtering after join Date: Thu, 26 Jan 2006 12:22:34 +0100 User-Agent: KMail/1.8.3 Cc: andrew References: <29d3b0b90601250927o2a5ee6e6mc33a7647da4438ce@mail.gmail.com> <200601261127.05442.peter_e@gmx.net> <29d3b0b90601260254n10d2c9aby77651744337020f8@mail.gmail.com> In-Reply-To: <29d3b0b90601260254n10d2c9aby77651744337020f8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601261222.34906.peter_e@gmx.net> X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.131 required=5 tests=[AWL=0.131] X-Spam-Score: 0.131 X-Spam-Level: X-Archive-Number: 200601/178 X-Sequence-Number: 23967 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/