Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 981BE47593C for ; Wed, 17 Jul 2002 20:19:23 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1581247; Wed, 17 Jul 2002 17:19:25 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Bruno Wolff III Subject: Re: Indexing UNIONs Date: Wed, 17 Jul 2002 17:19:22 -0700 X-Mailer: KMail [version 1.4] Cc: pgsql-sql@postgresql.org References: <20020716114553.GB29323@wolff.to> <200207161542.23433.josh@agliodbs.com> <20020717120646.GA5520@wolff.to> In-Reply-To: <20020717120646.GA5520@wolff.to> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207171719.22224.josh@agliodbs.com> X-Archive-Number: 200207/270 X-Sequence-Number: 8648 Bruno, > I think you might be able to do this using (one sided) outer joins of the= =20 event > table to the Case and Trial Group tables. The join rules will need to wor= k=20 for > exactly one of the two tables. You probably will want to use case stateme= nts=20 in > the select list to pick values from the right table. Yeah, I'm doing that in some places. It just doesn't work for all queries. COALESCE() is my friend. --=20 -Josh Berkus Aglio Database Solutions San Francisco