Re: Fix numeric log() with an infinite value and 0<base<=1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix numeric log() with an infinite value and 0<base<=1
Date: 2026-10-15 15:28:46
Message-ID: 2264539.1792078126@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> writes:
> On Thu, 15 Oct 2026 at 04:16, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>> After thinking it over, I think we can add a check for base 1 in log_var(), and numeric_log() can just defer base 1 handling to log_var(). Please see v2, which implements this approach.

> LGTM.

Works for me too. Pushed after a bit of comment-smithing.

I did not back-patch as you suggested, though. This behavior for
infinite input has been there for as long as we've had numeric
infinity, so I think the argument for changing it in stable branches
is pretty weak.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-10-15 15:32:37 Re: Bug in logical decoding with DDL and subtransactions
Previous Message Greg Burd 2026-10-15 15:27:31 Re: ZSTD TOAST compression, and an extensible compression method encoding