Re: ExplainProperty* and units

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2018-03-16T21:25:12Z
Lists: pgsql-hackers
On 2018-03-14 13:32:10 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Only thing I wonder is if we shouldn't just *remove*
> > ExplainPropertyLong and make ExplainPropertyInteger accept 64bits of
> > input - the effort of passing and printing a 64bit integer will never be
> > relevant for explain.
> 
> -0.5 ... everywhere else, we mean "int32" when we say "int", and I don't
> think it's worth the potential confusion to do it differently here.

Since I'm +1 on this (I don't think Integer is the same as int, there's
no benefit in having two functions, and I've already written the patch
this way), I'm inclined to go with one function.  Does anybody else
have an opinion?

- Andres


Commits

  1. Add 'unit' parameter to ExplainProperty{Integer,Float}.

  2. Make ExplainPropertyInteger accept 64bit input, remove *Long variant.