From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | =ANY bug |
Date: | 1998-12-03 15:06:36 |
Message-ID: | 12671.981203@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
Because IN is semantically identical to =ANY
here the same error using ANY:
select * from emp where ename =ANY (
select ename from emp group by ename having 1 < count(ename)
);
ename |empno|job | hiredate|sal |comm|deptno|level| mgr
------+-----+----------+----------+---------+----+------+-----+----
ALLEN | 7499|SALESMAN |1981-02-20|$1,600.00| 300| 20| 4|7782
BLAKE | 7698|MANAGER |1981-05-01|$2,850.00| | 30| 3|7782
JONES | 7900|CLERK |1981-12-03|$950.00 | | 30| 2|7782
MILLER| 7654|SALESMAN |1981-09-28|$1,250.00| 400| 30| 3|7839
CLARK | 7844|SALESMAN |1981-09-08|$1,500.00| | 10| 2|7839
KING | 7521|SALESMAN |1981-02-22|$1,250.00| 500| 10| 1|7782
ALLEN | 7499|SALESMAN |1981-02-20|$1,600.00| 300| 20| 4|7782
BLAKE | 7698|MANAGER |1981-05-01|$2,850.00| | 30| 3|7782
(8 rows)
but I expect the following instead:
ename |empno|job | hiredate|sal |comm|deptno|level| mgr
------+-----+----------+----------+---------+----+------+-----+----
ALLEN | 7499|SALESMAN |1981-02-20|$1,600.00| 300| 20| 4|7782
BLAKE | 7698|MANAGER |1981-05-01|$2,850.00| | 30| 3|7782
ALLEN | 7499|SALESMAN |1981-02-20|$1,600.00| 300| 20| 4|7782
BLAKE | 7698|MANAGER |1981-05-01|$2,850.00| | 30| 3|7782
(4 rows)
-Jose'-
From | Date | Subject | |
---|---|---|---|
Next Message | Constantin Teodorescu | 1998-12-03 18:32:55 | Two ugly bugs in pg_dump :-( |
Previous Message | Sferacarta Software | 1998-12-03 14:35:34 | IN bug |