pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Bitmead <chris.bitmead@bigfoot.com>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] No DIVIDE Operator
Date: Mon, 03 May 1999 14:16:53 +0000
Message-ID: <372DAFD5.FAA368B1@bigfoot.com> (raw)
References: <372DA3DC.8EEAF089@zkm.de>

Isn't that what EXCEPT does?

chris=> create table foo (text text);
CREATE
chris=> insert into foo values('aaa');
INSERT 22153 1
chris=> insert into foo values('bbb');
INSERT 22154 1
chris=> insert into foo values('ccc');
INSERT 22155 1
chris=> select * from foo EXCEPT select 'aaa';
text
----
bbb 
ccc 
(2 rows)



> If there would be a divide operator, I could write
> 
> select name, prename from Person divide select name, prename from
> Officer;
> 
> without it, however, things get really complicated:
> 
> select name, prename from Person where prename not in ( select prename
> from Officer where Officer.name = Person.name );
> 
> This is an easy example. However, I have to deal with about 10 tables in
> a corresponding way.
> 
> Any better idea? Will there be a divide operator in PGSQL soon?
> 
> Thanks!
> 
> Regards
> 
> Joerg Fischer

-- 
Chris Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris.bitmead@bigfoot.com



view thread (6+ messages)  latest in thread

Message-ID: <372DAFD5.FAA368B1@bigfoot.com>
Permalink:  ../372DAFD5.FAA368B1@bigfoot.com/
Also on:    postgresql.org/message-id/372DAFD5.FAA368B1@bigfoot.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: chris.bitmead@bigfoot.com
  Subject: Re: [SQL] No DIVIDE Operator
  In-Reply-To: <372DAFD5.FAA368B1@bigfoot.com>
  References: <372DA3DC.8EEAF089@zkm.de> <372DAFD5.FAA368B1@bigfoot.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