From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jaime Casanova <el_vigia_ec@hotmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: query with =ALL
Date: Mon, 14 Jun 2004 13:07:29 -0700 (PDT)
Message-ID: <20040614125225.J51553@megazone.bigpanda.com> (raw)
In-Reply-To: <5688.1087242100@sss.pgh.pa.us>
References: <BAY8-F35GuluhfJpQPr0002c817@hotmail.com>
<5688.1087242100@sss.pgh.pa.us>
On Mon, 14 Jun 2004, Tom Lane wrote:
> "Jaime Casanova" <el_vigia_ec@hotmail.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.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone.bigpanda.com, tgl@sss.pgh.pa.us, el_vigia_ec@hotmail.com
Subject: Re: query with =ALL
In-Reply-To: <20040614125225.J51553@megazone.bigpanda.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