Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 30D5563458B for ; Thu, 7 May 2009 05:26:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 90718-08 for ; Thu, 7 May 2009 05:26:42 -0300 (ADT) X-Greylist: delayed 00:05:02.858677 by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mail.postgresql.org (Postfix) with ESMTP id 9C38E634562 for ; Thu, 7 May 2009 05:26:45 -0300 (ADT) Received: from [192.168.178.23] (brln-4dba2304.pool.einsundeins.de [77.186.35.4]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MKv5w-1M1yrO0JN0-0000kO; Thu, 07 May 2009 10:21:42 +0200 User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Thu, 07 May 2009 10:21:41 +0200 Subject: Distinct oddity From: Maximilian Tyrtania To: Message-ID: Thread-Topic: Distinct oddity Thread-Index: AcnO7NlLF7Oz6jrgEd6Q8AAjMt4/tA== Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/IF2R01tZykcrAkV7/of4PsTNN+gASkUG90rP xndt+UIk2bnmc0P1avRIbZTAkDzXD+a2bZTmei3dzYKyBy9Dxk YdtjEoDtNU6LGpKaEAF0yczdxw5c7CSaGzHMY46+EJDRTvbRkf XiA== X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200905/14 X-Sequence-Number: 32506 Hi there, does this look right? FAKDB=# select count(distinct(f.land)) from firmen f where f.typlist='Redaktion'; count ------- 1975 (1 row) FAKDB=# select count(distinct(f.land||'1')) from firmen f where f.typlist='Redaktion'; count ------- 4944 (1 row) FAKDB=# select version(); version ---------------------------------------------------------------------------- ---------------------------------------------------------- PostgreSQL 8.3.3 on powerpc-apple-darwin, compiled by GCC i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370) (1 row) Why would the 2 queries give different results? No inserts occurred in the meantime. tia, Maximilian Tyrtania