This is a discussion on Re: question about count(b) where b is a custom type within the pgsql Hackers forums, part of the PostgreSQL category; --> > Firstly, if you just want a count, what's wrong with count(1) or > count(*). > Because unless the ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > Firstly, if you just want a count, what's wrong with count(1) or > count(*). > Because unless the column does not allow nulls, they will not return the same value. Mike Pollard SUPRA Server SQL Engineering and Support Cincom Systems, Inc. -------------------------------- Better to remain silent and be thought a fool than to speak out and remove all doubt. Abraham Lincoln ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| ||||
| Pollard, Mike wrote: >>Firstly, if you just want a count, what's wrong with count(1) or >>count(*). >> > > > Because unless the column does not allow nulls, they will not return the > same value. Ah, but in the example given the column was being matched against a value, so nulls were already excluded. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| Thread Tools | |
| Display Modes | |
|
|