pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: olivier.boissard@cerene.fr <olivier.boissard@cerene.fr>
To: pgsql-admin@postgresql.org
Cc: Steve Holdoway <steve.holdoway@firetrust.com>
Subject: Re: except command
Date: Mon, 13 Aug 2007 16:54:46 -0500
Message-ID: <46C08CD6.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <46C0CD72.5090407@cerene.fr>
References: <46C099F6.8050002@cerene.fr>
	<46C0579F.EE98.0025.0@wicourts.gov>
	<20070814061358.d66d2cb3.steve.holdoway@firetrust.com>
	<46C05C0C.EE98.0025.0@wicourts.gov>
	<46C0CD72.5090407@cerene.fr>

>>> On Mon, Aug 13, 2007 at  4:30 PM, in message <46C0CD72.5090407@cerene.fr>,
"olivier.boissard@cerene.fr" <olivier.boissard@cerene.fr> wrote: 
> So it's like a filter on the first query

Exactly; I think that sums it up better than anything I said.
 
By the way, it does strike me as an odd omission that there is no set
operator in the ANSI standard to get you directly to the set of disjoint
elements.  With two datasets, a and b, you could always get there with:
 
(a EXCEPT b) UNION ALL (b EXCEPT a)
 
or with:
 
(a UNION ALL b) EXCEPT (a INTERSECT b)
 
Of course, you could store the sets in temporary tables to get there without
generating from scratch each time, if that is expensive.
 
-Kevin
 





view thread (7+ messages)  latest in thread

Message-ID: <46C08CD6.EE98.0025.0@wicourts.gov>
Permalink:  ../46C08CD6.EE98.0025.0@wicourts.gov/
Also on:    postgresql.org/message-id/46C08CD6.EE98.0025.0@wicourts.gov

 · 

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-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, olivier.boissard@cerene.fr, steve.holdoway@firetrust.com
  Subject: Re: except command
  In-Reply-To: <46C08CD6.EE98.0025.0@wicourts.gov>

* 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