From: Markus Schaber <schabi@logix-tt.com>
To: mark.dingee@cox.net
Cc: pgsql-sql@postgresql.org
Subject: Re: Question on UNION
Date: Mon, 22 May 2006 21:07:34 +0200
Message-ID: <44720BF6.6050109@logix-tt.com> (raw)
In-Reply-To: <21062336.1148324291670.JavaMail.root@eastrmwml05.mgt.cox.net>
References: <21062336.1148324291670.JavaMail.root@eastrmwml05.mgt.cox.net>
Hi, Mark,
mark.dingee@cox.net schrieb:
> I ran into something I wasn't expecting while developing a new
> application. I have two similar tables that are occasionally unioned
> pulling only about 3 fields from each. During my testing phase I
> noticed that the union statement was returning what appeared to be a
> distinct list rather than a pure union such as is illustrated below:
This is the documented behaviour of UNION, if you don't wand duplicate
elimination, use UNION ALL.
http://www.postgresql.org/docs/8.1/static/sql-select.html documents this
nicely.
HTH,
Schabi
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: schabi@logix-tt.com, mark.dingee@cox.net
Subject: Re: Question on UNION
In-Reply-To: <44720BF6.6050109@logix-tt.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