Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9928547729B for ; Tue, 7 Jan 2003 11:34:28 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id CBF3F476EA7 for ; Tue, 7 Jan 2003 11:34:07 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h07GYB0U013894; Tue, 7 Jan 2003 11:34:11 -0500 (EST) To: "Peter Galbavy" Cc: pgsql-sql@postgresql.org Subject: Re: weighting (the results of) a query ? In-reply-to: <023f01c2b669$6ce39270$4528a8c0@cblan.mblox.com> References: <001301c2b4a6$f969b360$36bd10ac@walrus> <021001c2b666$752c1d60$4528a8c0@cblan.mblox.com> <13705.1041956070@sss.pgh.pa.us> <023f01c2b669$6ce39270$4528a8c0@cblan.mblox.com> Comments: In-reply-to "Peter Galbavy" message dated "Tue, 07 Jan 2003 16:25:43 +0000" Date: Tue, 07 Jan 2003 11:34:11 -0500 Message-ID: <13893.1041957251@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/72 X-Sequence-Number: 10937 "Peter Galbavy" writes: > Not sure - what I want is only one row per real row but ordered as per the > constants. When you say duplicate-row-elimination do you mean including the > 'constant' weighting, Yes, UNION would consider all columns in deciding if two rows are dups. > What I mean is when an image row has both 'eat static' in the caption and as > a keyword, I want it returned only once... I think your query might fail on that requirement regardless, no? At least I missed how you'd prevent it. regards, tom lane