From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jaime Casanova <el_vigia_ec(at)hotmail(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: query with =ALL |
Date: | 2004-06-14 20:07:29 |
Message-ID: | 20040614125225.J51553@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, 14 Jun 2004, Tom Lane wrote:
> "Jaime Casanova" <el_vigia_ec(at)hotmail(dot)com> writes:
> > AND
> > CPA.cur_paralelo = ALL (SELECT cur_paralelo FROM aca_t_curso ...)
>
> Wait a second ... we are all overthinking the problem. The subselect
> returns three *different* values. It is not possible for any
> CPA.cur_paralelo values to be simultaneously equal to all three.
> So this test certainly fails at every row of CPA.
>
> Perhaps you meant "= ANY"?
I think what he wants is to output distinct sets of output columns where
for each of these sets of output columns there exists a set of rows that
meet the other conditions and that the set of cur_paralelo values for
that set of rows is the same as (or perhaps is a superset of) the set of
values returned from the subselect.
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Poole | 2004-06-14 20:44:15 | Re: Scalar subqueries |
Previous Message | Jaime Casanova | 2004-06-14 20:04:03 | Re: query with =ALL |