BUG #2739: INTERSECT ALL not working - Mailing list pgsql-bugs

From Mason Hale
Subject BUG #2739: INTERSECT ALL not working
Date
Msg-id 200611061733.kA6HXKnr055703@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #2739: INTERSECT ALL not working
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2694: Memory allocation error when selecting array
Next
From: Tom Lane
Date:
Subject: Re: BUG #2739: INTERSECT ALL not working