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 230D49DC83F for ; Fri, 27 Jan 2006 05:17:49 -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 82083-07 for ; Fri, 27 Jan 2006 05:17:50 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by postgresql.org (Postfix) with ESMTP id E1F979DC85A for ; Fri, 27 Jan 2006 05:17:46 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 13so602625nzn for ; Fri, 27 Jan 2006 01:17:48 -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=U7OyWuHR4nu+WInQ/HIjmGF2dw/8Iza3g6SqhW3gWdQ34MJ5+Qi3EjXU4Xot9N2TUEVwH9IQv8DDyFJeONpXmySIl5wKlej2Ig6yBc1C8ARvCf3C0D3EGIaVk2CfHJdb3Fyww4gl/RxxMiY8twubE5NaedyTKb64TGMRNnBVPbY= Received: by 10.65.103.3 with SMTP id f3mr105936qbm; Fri, 27 Jan 2006 01:17:48 -0800 (PST) Received: by 10.65.139.5 with HTTP; Fri, 27 Jan 2006 01:17:48 -0800 (PST) Message-ID: <29d3b0b90601270117t2a8ec180x469b2a65f6b29a13@mail.gmail.com> Date: Fri, 27 Jan 2006 10:17:48 +0100 From: andrew To: pgsql-sql@postgresql.org Subject: Re: filtering after join In-Reply-To: <29d3b0b90601270110w645eab52k41ea6e385f297ae4@mail.gmail.com> 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> <200601261222.34906.peter_e@gmx.net> <29d3b0b90601260454g35817213o7d5a0e8a1e53ddf7@mail.gmail.com> <200601261759.31184.peter_e@gmx.net> <29d3b0b90601270110w645eab52k41ea6e385f297ae4@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.205 required=5 tests=[AWL=0.205] X-Spam-Score: 0.205 X-Spam-Level: X-Archive-Number: 200601/192 X-Sequence-Number: 23981 I got errors in this query. I have a function complete(record) which takes a generic record type data. But it seems cannot be applied to a sub-select result: backend> explain select * from (select * from Person,Auction where Person.id=3DAuction.seller) as s where complete(s) QUERY: explain select * from (select * from Person,Auction where Person.id=3DAuction.seller) as s where complete(s) ERROR: Cannot pass result of sub-select or join s to a function On 1/27/06, andrew wrote: > I can see the final plan by using the EXPLAIN command. But I want to > know the procedure of the planner in handling nesting queries. Can you > direct me to the corresponding part of the code and/or the documents? > Thanks. > > On 1/26/06, Peter Eisentraut wrote: > > andrew wrote: > > > 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)? > > > > Look at the execution plan using the EXPLAIN command. > > > > -- > > Peter Eisentraut > > http://developer.postgresql.org/~petere/ > > > > > -- > andrew > -- andrew