| 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: | 21076.1008123810@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| 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 p.id 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));
 studid 
--------
    100
(1 row)
regression=#
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nicolai | 2001-12-12 15:50:39 | Unable to compare _bpchar for similarity in WHERE-clause (MINOR A NNOYANCE) | 
| Previous Message | pgsql-bugs | 2001-12-12 01:27:46 | Bug #536: the sql 'except' generates erroneous result |