pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-sql@postgresql.org
Subject: Re: Indexing UNIONs
Date: Wed, 17 Jul 2002 17:19:22 -0700
Message-ID: <200207171719.22224.josh@agliodbs.com> (raw)
In-Reply-To: <20020717120646.GA5520@wolff.to>
References: <20020716114553.GB29323@wolff.to>
	<200207161542.23433.josh@agliodbs.com>
	<20020717120646.GA5520@wolff.to>


Bruno,

> I think you might be able to do this using (one sided) outer joins of the 
event
> table to the Case and Trial Group tables. The join rules will need to work 
for
> exactly one of the two tables. You probably will want to use case statements 
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.

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




view thread (13+ messages)  latest in thread

Message-ID: <200207171719.22224.josh@agliodbs.com>
Permalink:  ../200207171719.22224.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200207171719.22224.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, bruno@wolff.to
  Subject: Re: Indexing UNIONs
  In-Reply-To: <200207171719.22224.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox