Re: What does count(*) count? - Mailing list pgsql-general

From Tom Lane
Subject Re: What does count(*) count?
Date
Msg-id 10771.1072887997@sss.pgh.pa.us
Whole thread Raw
In response to What does count(*) count?  (Együd Csaba <csegyud@vnet.hu>)
Responses Re: What does count(*) count?
List pgsql-general
=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud@vnet.hu> writes:
> I found that count(*) results less rows than grep.

That's a tad hard to believe.  I'm suspecting pilot error of some sort.

Perhaps you have more than one table named t_stockchanges (in different
databases or schemas) and you weren't looking at the same one in both
cases?

Another possibility is that t_stockchanges has child table(s).  Your
SELECT would count rows in the child tables, but I don't think that
pg_dump -t would dump them.

            regards, tom lane

pgsql-general by date:

Previous
From: Együd Csaba
Date:
Subject: Re: What does count(*) count?
Next
From: "Lee Harr"
Date:
Subject: finding my schema (for sequences)