Skip site navigation (1) Skip section navigation (2)

Re: Bug #536: the sql 'except' generates erroneous result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: liao(at)sandiego(dot)edu, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #536: the sql 'except' generates erroneous result
Date: 2001-12-12 02:23:30
Message-ID: (view raw or whole thread)
Lists: pgsql-bugs
pgsql-bugs(at)postgresql(dot)org writes:
> the sql 'except' generates erroneous result

Yeah, anything with nested intersect/except is likely to give the wrong
answers in 7.1.* :-(.  This seems to be a variant of that problem.
In 7.2beta I get the expected answer:

regression=# select distinct t.studid from stranscript t where not exists(
regression(# (select from s_professor p where p.deptid = 'MUS')
regression(# except
regression(# (select  te.profid from s_teaching te, stranscript t1 where
regression(# t1.crscode=te.crscode and t1.semester = te.sem and t1.studid=t.studid));
(1 row)


			regards, tom lane

In response to

pgsql-bugs by date

Next:From: NicolaiDate: 2001-12-12 15:50:39
Subject: Unable to compare _bpchar for similarity in WHERE-clause (MINOR ANNOYANCE)
Previous:From: pgsql-bugsDate: 2001-12-12 01:27:46
Subject: Bug #536: the sql 'except' generates erroneous result

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group