X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E941A475AA9 for ; Tue, 13 May 2003 13:50:48 -0400 (EDT) Received: from secure.tritus.ca (baxter.tritus.ca [209.47.166.15]) by postgresql.org (Postfix) with ESMTP id 5B33C474E42 for ; Tue, 13 May 2003 13:50:48 -0400 (EDT) Received: from [10.200.200.129] (CPE00045ae165bc-CM014320108734.cpe.net.cable.rogers.com [::ffff:24.157.7.10]) (AUTH: CRAM-MD5 adam@tritus.ca, TLS: TLSv1/SSLv3, 168bits, DES-CBC3-SHA) by secure.tritus.ca with esmtp; Tue, 13 May 2003 13:50:47 -0400 Date: Tue, 13 May 2003 13:50:43 -0400 From: Adam Sherman To: pgsql-sql@postgresql.org Cc: Josh Berkus Subject: Re: Locating all Children given Set of Parents Message-ID: <195300000.1052848243@saturn> In-Reply-To: <200305130947.46844.josh@agliodbs.com> References: <184690000.1052842782@saturn> <200305130947.46844.josh@agliodbs.com> X-Mailer: Mulberry/3.0.3 (Linux/x86) X-OpenPGP: 82C7 7288 650F 8F77 2FFB C170 3698 125A 79C3 FC80 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Status: No, hits=-29.3 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/234 X-Sequence-Number: 13399 On 05/13/03 09:47:46 -0700 Josh Berkus wrote: > Select children.* > from children where exists (select pc_id > from parent_child > where pc.child_id = children.id > and pc.parent_id IN ($parent_id_list) > ); Great, that works fine. pc_id is not important. Thanks for your quick help! A. -- Adam Sherman Tritus CG Inc. http://www.tritus.ca/ +1 (613) 797-6819