Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics

From: Alexey Dokuchaev <danfe(at)nsu(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Aggregate functions with FROM clause and ROW_COUNT diagnostics
Date: 2018-05-21 17:24:35
Message-ID: 20180521172435.GA12264@regency.nsu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, May 21, 2018 at 12:54:56PM -0400, Tom Lane wrote:
> Alexey Dokuchaev <danfe(at)nsu(dot)ru> writes:
> > Quick reality check question: are count(*) vs. count(_) equivalent
> > above?
>
> Only if _ is guaranteed non-null ... which, as a rowtype result, it
> probably is. But I'd use count(*) if you're concerned about speed.

Understood. Yes, my primary concern (after correctness) is speed. Thank
you all again for very helpful and prompt replies guys.

./danfe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bartosz Dmytrak 2018-05-21 21:40:18 posgresql.log
Previous Message Stephen Frost 2018-05-21 17:01:32 Re: Will Altering and Modifying tables during backup result in a corrupted server after the restore?