The following bug has been logged online:
Bug reference: 2739
Logged by: Mason Hale
Email address: masonhale@gmail.com
PostgreSQL version: 8.1.5
Operating system: GNU/Linux 2.6.9-42.0.3.ELsmp
Description: INTERSECT ALL not working
Details:
'INTERSECT ALL' does not return duplicate rows in a query.
The query below should return 10 rows, but it returns 5 rows on my system:
(
SELECT tablename
FROM pg_tables
LIMIT 5
)
INTERSECT ALL
(
(
SELECT tablename
FROM pg_tables
LIMIT 5
)
UNION ALL
(
SELECT tablename
FROM pg_tables
LIMIT 5
)
)
Note, the above is a simplied query meant to demonstrate the problem. This
same behavior occurs (and was discovered) in real-world situations with
user-defined tables.
This is nearly a deal-stopper for our application. Please reply to let me
know the status of this report.
Thanks,
Mason Hale