pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-sql@postgresql.org
Cc: Claus Guttesen <kometen@gmail.com>
Subject: Re: select vs. select count
Date: Tue, 27 Mar 2007 16:20:08 +0200
Message-ID: <200703271620.10123.peter_e@gmx.net> (raw)
In-Reply-To: <b41c75520703270537y12d83fe5w7fc58f6e35fbe13d@mail.gmail.com>
References: <b41c75520703270537y12d83fe5w7fc58f6e35fbe13d@mail.gmail.com>

Claus Guttesen wrote:
> Why does select and select(count) produce two different results?

count(expression) only counts nonnull values.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



view thread (5+ messages)  latest in thread

Message-ID: <200703271620.10123.peter_e@gmx.net>
Permalink:  ../200703271620.10123.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200703271620.10123.peter_e@gmx.net

 · 

reply

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: peter_e@gmx.net, kometen@gmail.com
  Subject: Re: select vs. select count
  In-Reply-To: <200703271620.10123.peter_e@gmx.net>

* 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