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 2F0979DCA29 for ; Wed, 25 Jan 2006 15:11:19 -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 52878-03 for ; Wed, 25 Jan 2006 15:11:18 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by postgresql.org (Postfix) with SMTP id 459C39DC891 for ; Wed, 25 Jan 2006 15:11:15 -0400 (AST) Received: (qmail invoked by alias); 25 Jan 2006 19:11:14 -0000 Received: from dslb-084-063-054-060.pools.arcor-ip.net (EHLO colt.pezone.net) [84.63.54.60] by mail.gmx.net (mp030) with SMTP; 25 Jan 2006 20:11:14 +0100 X-Authenticated: #495269 From: Peter Eisentraut To: pgsql-sql@postgresql.org Subject: Re: filtering after join Date: Wed, 25 Jan 2006 20:11:13 +0100 User-Agent: KMail/1.8.3 Cc: andrew References: <29d3b0b90601250927o2a5ee6e6mc33a7647da4438ce@mail.gmail.com> In-Reply-To: <29d3b0b90601250927o2a5ee6e6mc33a7647da4438ce@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601252011.13465.peter_e@gmx.net> X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.132 required=5 tests=[AWL=0.132] X-Spam-Score: 0.132 X-Spam-Level: X-Archive-Number: 200601/170 X-Sequence-Number: 23959 andrew wrote: > I want to use a UDF to filter tuples t that are generated after a > join. More specifially, I have a UDF foo(record), which computes a > value for a given tuple. I can do the filtering before the join. > e.g.: > > select * from A, B where foo(A)<2 and A.a=B.b; What makes you think that the filtering happens before the join here? And why would it matter? The results should be all the same. -- Peter Eisentraut http://developer.postgresql.org/~petere/