Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 59C7B2E0075 for ; Wed, 5 Dec 2007 04:44:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 09556-03 for ; Wed, 5 Dec 2007 04:44:05 -0400 (AST) Received: from oxford.xeocode.com (unknown [87.127.95.196]) by postgresql.org (Postfix) with ESMTP id 670E82E0064 for ; Wed, 5 Dec 2007 04:44:17 -0400 (AST) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1Izprb-0003qf-N4; Wed, 05 Dec 2007 08:44:15 +0000 To: "Ehab Galal" Cc: Subject: Re: marking tuples In-Reply-To: (Ehab Galal's message of "Tue\, 4 Dec 2007 17\:25\:09 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.sql" 1440) References: From: Gregory Stark Organization: EnterpriseDB Date: Wed, 05 Dec 2007 08:44:15 +0000 Message-ID: <87odd55y5c.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/11 X-Sequence-Number: 29703 "Ehab Galal" writes: > In my algorithm, each NewJoin node may "mark" its ps_ResultTupleSlot with > either red/green. I need that mark to flow in the pipeline so that i can > collect them at the top aggregate. How will you tell about the marks from different NewJoins? I think you'll have to "project" the tuple and add a resjunk column to indicate that flag. I don't know how you'll identify that column from other such flag columns other NewJoin nodes have added. You could look at the setop code in prepunion.c like intersection to see other plans which add flag columns. In those cases though they are used by the direct parent of the node which added it, so the planner can just mark a field in the parent indicating which column it should look at for the flag. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning