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 E96FE9DC871 for ; Wed, 25 Jan 2006 13:27:40 -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 26776-06 for ; Wed, 25 Jan 2006 13:27:39 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.195]) by postgresql.org (Postfix) with ESMTP id AFE2B9DC837 for ; Wed, 25 Jan 2006 13:27:38 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 14so153738nzn for ; Wed, 25 Jan 2006 09:27:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PTXnSImB44x0bmQoCklkxtvd6MU0nPuAfnPfJEwNDCvvuuAeMFTsv6VvjcGwzCXonY87KVZrbiWEWgzMZ/O379yuPWICyJTzKujbqe3KYb/anQqIvAukW2nIrszX1IuWYoViruBy87RkekVK1/zdLjrCYw7M5gqp689gQihVZAE= Received: by 10.64.91.8 with SMTP id o8mr486716qbb; Wed, 25 Jan 2006 09:27:33 -0800 (PST) Received: by 10.65.135.2 with HTTP; Wed, 25 Jan 2006 09:27:33 -0800 (PST) Message-ID: <29d3b0b90601250927o2a5ee6e6mc33a7647da4438ce@mail.gmail.com> Date: Wed, 25 Jan 2006 18:27:33 +0100 From: andrew To: pgsql-sql@postgresql.org Subject: filtering after join MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.275 required=5 tests=[AWL=0.275] X-Spam-Score: 0.275 X-Spam-Level: X-Archive-Number: 200601/167 X-Sequence-Number: 23956 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=3DB.b; But I want to apply foo() to the tuples generated by the join operation. How can I do that? Thanks! -- andrew