Re: [SQL] No DIVIDE Operator

From: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] No DIVIDE Operator
Date: 1999-05-03 14:16:53
Message-ID: 372DAFD5.FAA368B1@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(dot)bitmead(at)bigfoot(dot)com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Bitmead 1999-05-03 14:19:43 Re: [SQL] Slow Inserts Again
Previous Message Frank Morton 1999-05-03 14:10:06 Re: [SQL] Slow Inserts Again