Re: UNION discards indentical rows in postgres 7.3.3

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Silvio Scarpati <silvio(dot)scarpati(at)virgilio(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: UNION discards indentical rows in postgres 7.3.3
Date: 2003-08-07 21:15:19
Message-ID: 1060290918.15749.21.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> Wrong ! The query should return 4 rows. In other words i don't know
> why postgres performs the following query:

I think the syntax you're looking for is UNION ALL.

select a,b from t1 union all (select distinct a,b from t2);

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2003-08-07 22:10:00 Re: UNION discards indentical rows in postgres 7.3.3
Previous Message Silvio Scarpati 2003-08-07 21:08:54 UNION discards indentical rows in postgres 7.3.3