Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 78B6363316F for ; Thu, 7 May 2009 15:54:13 -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 45612-01 for ; Thu, 7 May 2009 15:54:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f167.google.com (mail-ew0-f167.google.com [209.85.219.167]) by mail.postgresql.org (Postfix) with ESMTP id 90D7F633098 for ; Thu, 7 May 2009 15:54:11 -0300 (ADT) Received: by ewy11 with SMTP id 11so1561871ewy.19 for ; Thu, 07 May 2009 11:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Uk08panBZvV9edNMq8LP+v0O6M+fUyeLCSys1edjTAw=; b=sQ9O0wN9rc/n1w3xtIRb+anrv+ikwv57y97TayV7YMDVt7x9zikXfqhDpX/McVGHXK kLu2h4kuvFuJVdeiObSM/B5yhDaPL7qIIw/8/uEMlxDkfXb5wPeN1UsQuKvoF3gdNfdA CLc4OwZyVICLBjZvRN8k/svjEjZRMU/xWQ/ns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=NN1vutiB9UsmIoAnEyuklBA9cQfcGjADSEsAdq+RADgVTbody912Qi39wjt0p74h6V NokVpnrRm2pl1tJME3QY8vP1nvyFRyDoKElZnb0B6HikY7ne06Bmedl8SdYJ1HKrVh49 P713upg9wi74k9w0wN5BTDJ0E8Ep6lT4QEcpU= MIME-Version: 1.0 Received: by 10.210.58.17 with SMTP id g17mr50500eba.4.1241722449639; Thu, 07 May 2009 11:54:09 -0700 (PDT) In-Reply-To: References: Date: Thu, 7 May 2009 12:54:09 -0600 Message-ID: Subject: Re: Distinct oddity From: Scott Marlowe To: Maximilian Tyrtania Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL=0.008 X-Spam-Level: X-Archive-Number: 200905/17 X-Sequence-Number: 32509 On Thu, May 7, 2009 at 2:21 AM, Maximilian Tyrtania wrote: > Hi there, > > does this look right? > > FAKDB=3D# select count(distinct(f.land)) from firmen f where > f.typlist=3D'Redaktion'; > =A0count > ------- > =A01975 > (1 row) > > FAKDB=3D# select count(distinct(f.land||'1')) from firmen f where > f.typlist=3D'Redaktion'; > =A0count > ------- > =A04944 > (1 row) Yeah, that does seem odd. Could it be something like nulls in your data set? just guessing really. If you could make a small test case that shows it happening and allows others to reproduce it you're likely to get more bites.