X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A205F476348 for ; Tue, 13 May 2003 15:02:18 -0400 (EDT) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id EE08C475AA9 for ; Tue, 13 May 2003 15:02:13 -0400 (EDT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3031049; Tue, 13 May 2003 12:02:15 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Adam Sherman , pgsql-sql@postgresql.org Subject: Re: Locating all Children given Set of Parents Date: Tue, 13 May 2003 12:01:45 -0700 User-Agent: KMail/1.4.3 References: <184690000.1052842782@saturn> <200305130947.46844.josh@agliodbs.com> <194520000.1052848010@saturn> In-Reply-To: <194520000.1052848010@saturn> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200305131201.45493.josh@agliodbs.com> X-Spam-Status: No, hits=-23.3 required=5.0 tests=BAYES_01,IN_REP_TO,QUOTE_TWICE_1,REFERENCES, USER_AGENT_KMAIL 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/235 X-Sequence-Number: 13400 Adam, > > Select children.* > > from children where exists (select pc_id > > from parent_child > > where pc.child_id =3D children.id > > and pc.parent_id IN ($parent_id_list) > > ); >=20 > What is "pc_id" referring too? parent_child.id Which column you use isn't important, just don't use "SELECT *" --=20 -Josh Berkus Aglio Database Solutions San Francisco