Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1C1IpE92820 for ; Mon, 11 Feb 2002 20:18:51 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g1C1IMf18662; Mon, 11 Feb 2002 20:18:22 -0500 (EST) To: Henry House cc: pgsql-sql@postgresql.org Subject: Re: UNION and rows improperly unified: query optimization question In-reply-to: <20020211200524.GA17170@wotan> References: <20020211200524.GA17170@wotan> Comments: In-reply-to Henry House message dated "Mon, 11 Feb 2002 12:05:24 -0800" Date: Mon, 11 Feb 2002 20:18:22 -0500 Message-ID: <18659.1013476702@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200202/121 X-Sequence-Number: 6549 Henry House writes: > So I run two select and combine them > using a union statement, but this improperly combines two gl_entry lines th= > at > do not differ in amount or transaction ID. AFAICT you do not want duplicate-row elimination at all. Why don't you use UNION ALL? regards, tom lane